Travellers have been warned to expect disruption on the railway between Fife and Edinburgh after a power failure at Haymarket station.
Trains came to a standstill after the incident at 11.30am on Saturday as Network Rail staff were mobilised to fix the problem.
People were urged to switch to trams and buses to minimise the disruption while the repairs were being made.
A broken down train at Haymarket added to the disruption.
CLEAR: The broken down train is now on the move back to the depot and services are returning to normal, however there will be some alterations, cancellations and delays due to crews and units out of place.
— ScotRail (@ScotRail) February 22, 2020
The train has since been removed and services are now on the move again but Scotrail warned of possible alterations, cancellations and delays for the rest of the afternoon as crews and units are out of place.
The disruption came after drivers were urged to use extreme caution as Fife was battered by severe gales for the third weekend in a row.
There were a number of bumps on roads across Fife as motorists battled through the conditions and a number of trees in various locations were blown down.
Flooding has been experienced in Cupar and the Howe of Fife after torrential rain caused the River Eden to burst its banks.