A signalling fault near the Forth Bridge has affected train services from Edinburgh.
Network Rail engineers assessed the problem and ScotRail advised of timetable changes.
A spokesperson said: “We’ve had to make some changes to services, diverting an Edinburgh to Inverness, via Stirling, and cancelling some services from Edinburgh across the Forth Bridge to allow Network Rail enough access to the track to repair the fault.
“Please check your journey before travel.”
Network Rail confirmed, shortly before 9.30am, that the problem was with axle counters.
A spokesperson said: “Our problem this morning at North Queensferry was with ‘axle counters’ which detect the passing of trains between two points on the track and help us to run trains safely around the network.
“Sorry if you have been delayed while we fixed them.”
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.