The innocence of hundreds of sub-postmasters convicted in the Post Office Horizon scandal is set to be revealed after Parliament approved legislation to quash their convictions.
It was one of the final bills passed before lawmakers dissolved ahead of July's general election.
The law applies in England, Wales and Northern Ireland, and the Scottish Parliament is set to pass its own legislation to quash convictions.
The case is considered one of the biggest wrongful convictions in British judicial history.
Between 1999 and 2015, more than 900 subpostmasters were wrongfully prosecuted because of faulty accounting software called Horizon, which showed errors that did not exist.
Many subpostmasters went to prison for accounting fraud and theft, and some were financially ruined.
The public inquiry into the Horizon scandal is underway and this week heard from former Post Office boss Paula Vennells.
Passage of the Post Office Horizon System Breach Bill means that all convictions of people convicted of theft or accounting fraud while working at post offices that used the faulty IT system between 1996 and 2018 will be quashed.
Those whose convictions have been overturned will be eligible to receive compensation from the Horizon Conviction Compensation Scheme, which will be established once the bill is passed.
The unprecedented legislation was passed following a public outcry sparked by the broadcast of ITV drama Mr Bates v Post Office.
The law has been controversial among justices because for centuries it has been the job of the courts, not Congress, to address dangerous convictions.
But the government argues that the scale and circumstances of the scandal are so unusual that it will not set a precedent.