Train services between Tweedbank and Edinburgh were disrupted on Wednesday due to a women being struck by a train.
She was treated by paramedics at the scene before taken to hospital.
The incident resulted in the cancellations of the 3.20pm and 6.17pm services to Tweebank and the 6.32pm to Edinburgh.
Other services on the line were subject to delays throughout the day.
A spokeswoman for Scot Rail said: “Due to a person being struck by a train at Dalmeny, services between Edinburgh and Fife are currently disrupted. The line has reopened.
“Anyone delayed over 30 minutes should keep hold of their tickets, as they will be eligible for compensation under our Delay Repay scheme.
She added: “Many services around the Edinburgh area are affected by the incident earlier. Trains are out of place as a result of the delays and this can cause cancellations to some services on other routes.”
A British Transport Police spokesman said: “Officers were called to Dalmeny station at 2.16pm following reports of a person being struck by a train. Officers attended alongside the Scottish Ambulance Service and a woman was treated for injuries before being taken to hospital.
“Her injuries do not appear to be life threatening. This incident is not being treated as suspicious.”