In the days when trains were painfully slow, it was not unusual for passengers to break their journey for a beer or glass of wine.
However, when a train driver followed suit, there was understandable cause for concern.
That is what engine driver Hugh Riddish and his crew did back in the winter of 1877.
They parked up a mighty freight train in the dark on a main line and went on a drinking spree in Cowdenbeath.
The matter ended up in court but it was the hotelier, not the railwaymen, who was charged.
Fife Chief Constable James Bremner came down hard on John Brunton for serving drink to the crew. The police officer claimed the railwaymen were not bona fide travellers and so not entitled to be served drink on a Sunday. Brunton was fined £2 and ordered to pay 11s 6d expenses.
Brunton was outraged at the injustice and appealed to the high court, where it became clear the railwaymen were regulars at his hotel.
It seems they were in the habit of leaving a freight train unattended on the line while they enjoyed a refreshment.
The charge against Brunton followed an incident on November 4 1877.
Driver Riddish, fireman William Smith and guard John Wilson had left Glasgow on Friday November 2 on a seven-hour journey to Port-na-Craig ferry on the Tay. They spent one night there and at 10pm on Saturday, set off for Glasgow.
After two hours, their thirst got the better of them and they pulled up in Cowdenbeath.
The hotel was closed but the men gained admission by knocking on the window and flashing a railway lamp.
It is unclear who complained about Brunton but at the appeal, the Crown argued the railwaymen should not have been served because they had left the train in a dangerous position.
Appeal judges Lords Young and Craighill described the conviction as bad and stated the publican was not responsible for the railwaymen’s recklessness.
The conviction was overturned and Brunton awarded eight guineas.