Rail commuters were prevented from buying tickets from machines during the morning peak after a technical glitch.

A number of passengers reported missing their trains because of long queues at ticket offices.

Operators including Southern Rail, Greater Anglia, Great Northern and ScotRail all apologised to customers affected by the fault.

A spokesman for the Rail Delivery Group, which represents train companies, said: "We're sorry that some customers were inconvenienced by a technical fault affecting one supplier's system which meant that some train companies' ticket machines, not all, couldn't authorise card payments.

"The problem was fixed before 9am."

He added that the issue related to machines using software provided by German firm Scheidt & Bachmann.

Several passengers vented their frustration on social media.

Sian Julian wrote on Twitter: "All the ticket machines are broken at Chelmsford - just missed the train I needed to get because of the queue!"

Philosophy student Josh T. U. Cohen posted: "Ticket machine failure at (London Liverpool Street) is making me late... Wouldn't let anyone collect tickets. Had to queue for ages and missed train."

Greater Anglia posted on Twitter: "We are getting reports that stations are unable to process card payments. Nationwide problem affecting self service ticket machines."