A train worker has lodged an official complaint with Scotland’s rail operator after a passenger service was used to transport a body found near the tracks while commuters were still on board.

The rail conductor was reportedly “disgusted” by the move after police and ambulance services decided the distance to the nearest road was too far to transport the victim safely.

Passengers were reportedly moved into alternative carriages just north of Dumfries to allow the body to travel on the Glasgow to Carlisle service in January, the Scotsman reported.

READ MORE: Nine out of ten Scottish passengers 'satisfied' with ScotRail service

ScotRail told the newspaper it was the “most dignified way” of removing the body.

Emergency crews walked just over a mile along the tracks to find the scene of the incident after parking their vehicles three miles north of a signal box near the town.

The train was due to arrive in Dumfries just after midnight and it was decided taping off one carriage would be the quickest way to move the body.

One source told the Scotsman: “A ‘dignity crew’ drove to the nearest location, at the Holywood signal box, and walked up the track. The last train was held while the body was loaded aboard. 

“The body was on the train for a very short time, and taken off at Dumfries Station. This is not common or policy.”

READ MORE: Abellio's £11m fines for years of ScotRail failure

ScotRail refused to confirm whether a complaint had been received, however some reports suggested at least one of the handful of passengers still on board the train was upset by the incident.

A spokesperson for the rail operator said: “We worked closely with the emergency services to ensure this tragic event was handled in the most dignified way possible.

“Anyone affected by this incident can contact Samaritans for free of charge, any time, from any phone, on 116 123.”