Rishi Sunak has confirmed that the UK Government will bring in new legislation to make sure subpostmasters convicted as a result of the Horizon scandal are "swiftly exonerated and compensated."

The new law will only apply to England and Wales, but the Scottish Government has said they will consider their own legislation to reverse convictions north of the border.

READ MORE: Horizon IT scandal: Lib Dem leader Ed Davey under pressure

The Prime Minister told MPs that the subpostmasters convicted on the basis of evidence from a flawed IT system were victims of “one of the greatest miscarriages of justice in our nation’s history”.

Mr Sunak also announced a new upfront payment of £75,000 for the “vital” group of postmasters who took action against the Post Office.

At Prime Minister’s Questions, he said: “People who worked hard to serve their communities had their lives and their reputations destroyed through absolutely no fault of their own. The victims must get justice and compensation.”

Mr Sunak said “we will make sure the truth comes to light” and “right the wrongs of the past”.

The usual method for overturning a conviction would involve the courts, but with nearly 1,000 people caught up in the scandal, the Government is taking the unprecedented legislative route.

In 2019 the High Court ruled that Horizon contained a number of “bugs, errors and defects” and there was a “material risk” that shortfalls in Post Office branch accounts were caused by the system.

Their long-running battle for justice has leapt to the top of the political agenda following the ITV dramatisation of the scandal, Mr Bates Vs The Post Office.

In a statement following Prime Minister's Questions, Post Office minister Mr Hollinrake said the UK Government would engage with the devolved administrations in Scotland and Northern Ireland.

“We'll do these things as quickly as we can and keep the house informed.”

He admitted that it was an “imperfect” solution, but that it was hard to find any other remedy that wouldn’t “leave many people suffering under the burden of unjust convictions for many years, or perhaps forever with no access to compensation.”

The minister said there would be people who had acted criminally, and the government wanted to “avoid guilty people walking away with hundreds of thousands of pounds of public money.”

He said those receiving compensation would need to sign a statement saying that they did not commit the crimes of which they were accused with anyone subsequently found to have signed such a statement untruthfully putting themselves at risk of prosecution or fraud.

READ MORE: Horizon scandal: Constance requests meeting with UK minister

The scandal was raised during Prime Minister's Questions, with SNP Westminster leader Stephen Flynn telling MPs that the public was “angry” with Parliament.

He said the injustice "goes far beyond just the subpostmasters,” Mr Flynn said, listing other scandals including the infected blood scandal, Grenfell, Hillsborough and others.

He said: “The reality is that when the public come knocking on the doors of this here chamber seeking justice the Government only ever answers when they have no options left.”

He said the public is “angry at Westminster” because “they know that this place never really changes”.

Mr Sunak said the SNP politician was "trying to politicise something that has happened over multiple decades, with multiple people at fault.”

He said the Government acted after a 2019 court case and said the focus should be on those affected.