Passengers boarding an early morning train from Bern to the northern city of Basel spotted the non-venomous 50-centimetre (19.5-inch), black garter snake in a carriage and alerted staff, who in turn called the police, said Donatella Del Vecchio, SBB spokeswoman.
"All 450 passengers on the train were evacuated," she told AFP.
They were transferred to another train that left around half an hour later.
A passenger had most likely brought the snake on board, Del Vecchio said, ruling out the possibility it made its way onto the train on its own.
Police finally caught the snake in a ventilation shaft, Bern police said in a statement.