More than 550 sub-postmasters won their first case against the post office on an IT system, according to which some of them were wrongly accused of theft and false accounting.
The dispute over the Horizon system went through a decade, but on Friday a High Court judge ruled in favor of postmasters in the first of the four trials.
Horizon was introduced between 1999 and 2000 but the six main applicants, who represented the largest group, claim that it was full of problems.
They accuse the post office of not training them correctly on the system, they are unable to investigate the causes of alleged deficiencies and deceive them about its reliability.
The post office rejects these claims and claims that the system worked perfectly.
The judge, Judge Fraser, will decide on alleged problems with the computer system and whether people have been wrongly accused in subsequent trials.
But on Friday he decided on the 23 key problem on the parties' contractual relationship, which will be important in the other hearings.
He said the post office is subject to good faith duties, fairness, transparency, cooperation and trust and confidence in dealing with postmasters, and that failure to do so would be a breach of the contract.
The president of the post office, Tim Parker, said he had taken the sentence "very seriously", but said that the organization could appeal the decision.
Some of those affected have he told Sky News how they fell into depression and felt like "I had a gun in my head" after being accused of stealing.
Balvinder Gill ran a post office in Oxford in 2003, before he was ordered to pay off a huge deficit that he said led to bankruptcy and depression.
"Every week I had the same problems of not being able to understand the errors that were occurring," he said.
"The data on the system never equaled the physical capital and the money: after six months, the auditors arrived at my office and told me that I could not enter the counter.
"They said, with their calculations, that I had about 60,000 pounds less, I couldn't get up, I was devastated."
The Justice for Subpostmasters Alliance (JFSA) stated that it had registered an "emphatic" victory.
The first trial took place at the end of last year and at least two others should decide on other aspects of the case, including potential compensation.
Alan Bates, one of the main players, called it an "important step towards achieving justice and achieving the truth".
He said: "Whatever happens now, this is the victory we fought for – the postmasters have won and the post office will never be able to behave as they did in the past. ;impunity".
"The post office describes itself on its website as" the nation's most trusted brand "," Judge Fraser said.
"As for these applicants, and the subject of this group dispute, this could be thought to be a totally pious thought."
The president of the post office, Tim Parker, said: "We have taken his criticisms into consideration and will act throughout our organization.
"Our postmasters are the backbone of our business and our first priority will be to consider the points raised about managing our contractual relationships and how we could improve them."
He said that the problems raised by postmasters would be "investigated even more quickly and transparently" and that training would also be improved.
However, he added the post office was considering the appeal for the outcome of the first trial based on "some legal interpretations".