Rail services were disrupted on Friday evening after a lorry struck the rail bridge at Lochgelly.
Lochgelly services between Edinburgh to Glenrothes via Kirkcaldy and Dunfermline were delayed and there was a knock-on effect for buses.
The incident happened just before evening rush-hour.
A bridge inspection was later completed and services got back up and running again before 6pm although there was ongoing disruption.
Station Road also reopened to traffic following the recovery operation.