Nearly 6,000 Greater Anglia passengers fined for travelling without the correct ticket are set to be reimbursed after a court decided the wrong legal process had been used.

Greater Anglia was one of six rail companies that used the Single Justice Procedure (SJP) to take some who did not pay penalty fines for travelling without a ticket to court.

A total of 74,000 fines were made across the country between 2016 when the procedure was introduced and March this year when the first legal queries were raised.

In a ruling on Thursday at Westminster Magistrates Court, Chief Magistrate Paul Goldspring said six “test cases” should be declared “void”, adding that the cases of thousands of other cases would be dealt with in the same way over the coming months.

The judge said the Courts Service, the Department for Transport and the train operating companies would work to identify those affected, and that “a team will be put in place to begin the work of recovering the money paid and refund the money to individuals” by November.

“There are discussions ongoing with all the parties about how that may be paid,” he added.

Neither the amount of money to be refunded nor the number of people affected has been confirmed, but Judge Goldspring said “over 74,000” people is a “best guess at the moment”.

The SJP was set up in 2015 to allow magistrates to decide on minor offences, such as using a television without a licence or driving without car insurance, without defendants going to court.

Rail companies were permitted to use the SJP in 2016 to privately prosecute fare evaders, but many have been brought under the Regulation of Railways Act 1889, which is not allowed under the procedure.

In June, Judge Goldspring said those convictions were “probably unlawful”, with lawyers for rail companies telling a further hearing last month they were “in agreement” the prosecutions should be thrown out.

Two companies were named in the court case - Arriva Rail North (Northern Rail) and Greater Anglia. The other four  who used the procedure are Trans Pennine Express, Avanti West Coast, Great Western, and Merseryrail.

A Greater Anglia official said not all those who had been served with court fines during this time had been through SJP.

It is understood those affected will be contacted directly and given further instructions.

A Greater Anglia spokesperson said: “Following the hearing at Westminster Magistrates Court today we are now working to ensure all those who are entitled to compensation as a result of this procedural error are quickly and fully reimbursed.

"Like many in the industry, we acted in good faith following the introduction of the Single Justice Procedure in 2016, but we apologise for using this process incorrectly.”

In written submissions for a hearing in July, Greater Anglia said it acknowledged “a series of significant errors” had occurred and wanted to “apologise unreservedly” to those affected.

Tom Franklin, the chief executive of the Magistrates’ Association, called for reform of the SJP and said “serious questions” had been raised by the case.

He said: “This ruling has big implications for tens of thousands of people, and there are serious questions that the prosecuting authorities – in this case the train companies – need to answer as to how this was allowed to happen.”

A Government spokesperson said: “We acknowledge the Chief Magistrate’s judgment and welcome the apology from train operators. While fare evasion should be tackled, the right process should be followed at all times.

“The people affected will be directly contacted in due course to resolve the cases in accordance with the judgment.”