Rail services into and out of Edinburgh have resumed following an early morning computer glitch which hit rush hour trains.
Thousands of commuters were affected by the disruption
Services were halted when a computer system indicated a signal failure in the Haymarket area.
Maintenance firm Network Rail checked out the warning but discovered there was no problem with the signals.
An estimated 15,000 travellers were affected by the disruption and First Scotrail apologised for the delays.
The first Glasgow to Edinburgh service arrived at Waverley station in the capital after 0900 BST on Thursday.
All previous services had terminated at Linlithgow, 15 miles west of the city centre.
Steve Montgomery, operations director of First Scotrail, said his company were informed of the fault at 0500 BST.
He said: "We could not get our trains out of our depots and they couldn't depart or get into Edinburgh.
"Obviously this had a major effect on all our customers coming in from Fife and from the Glasgow and Dunblane area."
He responded to criticism that services from Glasgow were terminating at Linlithgow.
Mr Montgomery said: "Because of the signalling failure we could only get so far in towards Edinburgh and then you have to be able to find a location where you can turn the trains and send them back again."