Transport police are investigating vandalism which disrupted train services in Fife.
Cabling was cut at three points near Lochgelly causing a problem with the signalling system between Cowdenbeath and Dunfermline.
Network Rail engineers were dispatched to the site and closed the line to allow tests to be conducted.
ScotRail said severe damage had been caused and engineers put in place contingency arrangements until it was rectified.
Some Fife Circle services were cancelled and others were disrupted following the incident on Friday morning.
The train operator confirmed later in the afternoon repairs had been made and services had returned to normal.
Thornton to Edinburgh trains via Cowdenbeath started at Inverkeithing and Edinburgh to Cowdenbeath trains used platform two at Cowdenbeath until the situation was rectified.
A ScotRail spokesman said on Friday morning: “We have been advised of a fault with the signalling system between Cowdenbeath and Dunfermline which is causing disruption to some services.
“Trains from Cowdenbeath to Inverkething are being disrupted but trains from Inverkeithing towards Cowdenbeath are running normally.
“We can confirm that the cause of the signalling issue has been caused by an act of vandalism.
“A cable has been cut between two location points near Inverkeithing.”
UPDATE: We can confirm that the cause of the signalling issue has been caused by an act of vandalism. A cable has been cut between two location points near Inverkething.
— ScotRail (@ScotRail) December 20, 2019
Network Rail said its engineers were on site with the British Transport Police in response to an act of vandalism.
It was initially thought there was only one cut but a further two were found and more engineers were sent out.
We're on-site with @BTP responding to an act of vandalism that's disrupting services in Fife. Signalling cables have been cut. Working to repair the damage, but this will take at least 2 hours. Follow your train operator for service info. @ScotRail @CrossCountryUK @LNER pic.twitter.com/tQZ0x80g0v
— Network Rail Scotland (@NetworkRailSCOT) December 20, 2019
We have found 2 further cable cuts. Sufficient cable on site to begin repairs and carry out further testing.
— Network Rail Scotland (@NetworkRailSCOT) December 20, 2019
British Transport Police appealed for anyone with information to help it trace those responsible.
A spokesman said: “At 6.30am today, officers were called to the railway near to Lochgelly following a report of damage to the signalling systems.
“Officers attended and are now conducting an investigation to understand exactly how much cable was damage and who was responsible.
“Anyone with information is asked to contact BTP by sending a text to 61016 or by calling 0800 40 50 40 quoting reference 101 or 20/12.”