Commuters have faced travel misery following a Network Rail signalling fault at Haymarket.
The fault was reported shorty after 9.30am on Wednesday affecting countless services across the country.
Engineers worked throughout the day to replace a faulty part, despite initial predictions the job would take an hour.
Train operator ScotRail cancelled - or revised - timetables and replacement buses were in place at Edinburgh, Bathgate, Cumbernauld, Linlithgow, Falkirk High, Falkirk Grahamston, Polmont, West Calder, Glasgow Queen Street and Stirling.
Frustrated travellers took to social media to vent their frustration at the disruption.
Neil Hunter wrote on Twitter: “You said this would be resolved within 60 minutes over two hours ago. Will this be fixed by rush hour?”
Another passenger posted: “You might want to put some staff on at Edinburgh Park where the buses are dropping people off to tell them where to go for the trams. It’s like the Marie Celeste. Plenty staff at Bathgate though.”
Passengers were advised to check https://www.journeycheck.com/scotrail/ for updates.
Sign up to our newsletter: enter your email in the box at the top of this article to get daily updates straight to your inbox.