The Post Office is to pay almost £58m to settle a long-running dispute with sub-postmasters and postmistresses.
The settlement brings an end to a mammoth series of court cases over the Horizon IT system used to manage local post office finances.
A group of postmasters said faults with the system resulted them wrongly being accused of fraud and false accounting.
The Post Office said it accepted it had “got things wrong in our dealings with a number of postmasters”.
Sub-postmasters run Post Office franchises across the UK, which typically provide some but not all of the services of a main post office.
The group of 550 claimants joined a civil action to win compensation last year, but their complaint goes back much further.
They alleged that Horizon – which was installed between 1999 and 2000 – contained a large number of defects.
Some said their lives had been ruined when they were pursued for funds which managers claimed were missing. Some even went to jail after being convicted of fraud.
They were half way through a series of four trials when the Post Office sought mediation.
It is not clear how much individual postmasters and mistresses will receive after legal costs and charges from firms backing the group action have been deducted.
It could take several weeks for individual compensation payments to be worked out.
In a statement on Wednesday, Alan Bates, one of the lead claimants, said: “[We] would like to thank Nick Read, the new chief executive of Post Office, for his leadership, engagement and determination in helping to reach a settlement of this long-running dispute.
“During the mediation, it became clear that he intends to reset the relationship between the Post Office and its sub-postmasters and put in place new processes and support for them, as part of a wider programme of improvements.”
The Post Office apologised to the claimants, saying it was grateful to them “for holding us to account in circumstances where, in the past, we have fallen short.”
Mr Read said: “I am very pleased we have been able to find a resolution to this longstanding dispute.
“Our business needs to take on board some important lessons about the way we work with postmasters, and I am determined that it will do so. We are committed to a reset in our relationship with postmasters, placing them alongside our customers at the centre of our business.”