A signalling fault was reported at around 3:30pm at Dalmeny near the Forth Bridge, impacting services between Edinburgh and Glenrothes via Dunfermline Town and Kirkcaldy.
As a result services were subject to delay and revision
Rail users were warned to expect delays and follow Scotrail on social media for updates.
ScotRail announced at 4:11pm that Network Rail engineers had managed to fix the fault.
They added that some disruption would still be expected while services returned to their normal timetable.