An investigation has been launched after a restored diesel locomotive partially derailed from a heritage railway line during a festival in Dorset.

Evening diesel gala and beer festival train services on the Swanage Railway heritage line were suspended on Saturday after the diesel locomotive partially derailed at Corfe Castle station.

The incident involving an ex-British Rail Class 50 locomotive named Indomitable occurred at around 6.30pm as a passenger train bound for Harman’s Cross and Swanage was running into Corfe Castle station from Norden.

The incident happened at Corfe Castle railway station (Alamy/PA)

The restored 115-ton heritage diesel locomotive, built in 1968, was on the back of the six-carriage passenger train when it partially derailed.

No passengers were injured and no damage was sustained to the carriages of the train in the incident.

The partial derailment happened on the second day of an annual three-day diesel gala and beer festival, which is in its 17th year on the Swanage Railway.

Nine heritage diesel locomotives from the 1960s and 1970s – seven of them visiting the Swanage Railway and two resident – gathered on the heritage line to haul passenger trains during the gala and festival.

The Swanage Railway has informed the Government’s independent Rail Accident Investigation Branch (RAIB) which is investigating the cause of the partial derailment.

The heritage line’s regulator and inspectorate – the Government’s Office of Rail and Road (ORR) – is aware of the incident.

Specialist contractors were brought in to re-rail the diesel locomotive, with the operation being completed in the early hours of Sunday.

The locomotive, which carries British Rail Network South East livery from the 1980s, has been taken out of service and will be examined for any damage.

Swanage Railway Company chairman Gavin Johns said: “The Government’s Rail Accident Investigation Branch has been advised of the incident and we liaised with the RAIB regarding the recovery of the diesel locomotive and the RAIB’s investigation into what caused the partial derailment of the diesel locomotive.

“While the RAIB is investigating the incident – and after discussions with the RAIB – our planned train services for Sunday have been altered.

“There will be 11 trains operating but they will only be running on the five and a half miles of line between Swanage, Corfe Castle and Norden – not beyond Norden on the four miles of line to the River Frome, within sight of Wareham, as our train services were during the first two days of our annual diesel gala and beer festival.”

The Class 50 Indomitable locomotive was withdrawn from British Rail service in 1990 with a group of volunteers spending 15 years restoring it.