Train services between Newquay and Par in Cornwall have been suspended after a freight train derailed.
The train, from freight firm DB Schenker, came off the tracks at the company's rail yard at St Blazey.
No-one was injured, but passenger services are affected because it happened on a line adjacent to the Newquay to Par branch line.
Passenger bus services are in place while work is carried out to make the 20.75-mile (33-km) line operational.
The unit came off the rails but remained upright. However, engineers said it was making the branch line unsafe.
Network Rail engineers are on site to assess what needs to be done.
The passenger line links Par on the English Channel coast and Newquay on the Atlantic.