Passengers travelling to and from the capital were facing disruption tonight as freak stormy weather took hold.
A "lightning cluster" moved across Edinburgh from around 8pm with this remarkable photograph, taken by South Queensferry resident Claire Irvine, appearing to show the Forth Rail Bridge being struck by a fork of lightning.
One train came to a standstill on the bridge after the signalling system at North Queensferry failed.
Flooding on the line at Inverkeithing has also been reported.
READ MORE: Music legend Johnny Marr abandons Edinburgh show as "lightning cluster" strikes city centre
Services bound for Edinburgh - and those heading from the capital through Fife and towards Perth - were expected to be delayed by at least 30 minutes, a spokesman for ScotRail said.
ScotRail said it was working hard not to have to cancel services given the volume of passengers travelling to and from the Edinburgh Fringe Festival.
A spokesman for ScotRail said: “Our colleagues at Network Rail have advised us of a signalling fault caused by a power failure at North Queensferry and flooding at Inverkeithing, which has delayed some of our services.
"We are all working flat out to keep people moving.
"Any customers delayed by 30 minutes or more can claim compensation through our Delay Repay scheme by visiting scotrail.co.uk.”
READ MORE: Scotland weather warning: Torrential rain set to blast nation over weekend
Meanwhile, music legend Johnny Marr was forced to abandon his warm-up set for Primal Scream in Princes Street Gardens after lightning storms struck the city centre.
Primal Scream went on to perform - with fans enduring pouring rain to see the show.