All railway lines were closed at Aberdour due to trespassers on Monday afternoon, causing delays between Edinburgh and Aberdeen.
ScotRail confirmed services between Edinburgh and Aberdeen were altered and delayed due to people trespassing on the line between Burntisland and Aberdour in Fife.
Services between Edinburgh and Perth were also impacted by the disruption.
Two boys traced by police
Police have confirmed two boys were traced neared the railway line and that nobody was injured as a result of the incident.
ScotRail tweeted to inform passengers that all lines had reopened at around 5:30pm.
UPDATE: All lines have now reopened. We're working hard to get services running back to schedule but some delays are to be expected. Thanks for your patience this evening. ^Megan
— ScotRail (@ScotRail) May 2, 2022
Passengers were warned of some further delays as the firm worked on getting services back up and running to schedule.
Customers can use the National Rail real-time journey checker to find out if their journey has bene affected.
A Police Scotland spokesperson said: “Around 4pm on Monday, 2 May, police received a report of concern for two youths in the Aberdour Road area of Burntisland.
“Officers attended and traced the boys near the railway line. No one was injured and the incident is now resolved.”
Network Rail has been approached for comment.