A 30-year-old woman is in critical condition in hospital after her legs were severed while trying to pass between cars of a freight train following an outing at a bar with friends.

The accident happened around 2 a.m. ET Wednesday near the intersection of Bonsecours and de la Commune streets, in Montreal's Old Port. The woman and three or four friends had left a nearby bar.

Const. Danny Richer of Montreal police said a freight train was parked on the CN-owned tracks.

Instead of going around the train, the group decided to pass between its cars. When it was the woman's turn, the train began moving and she slipped.

"The train passed on her two legs," said Richer, adding she was taken to hospital and is in critical condition.

Investigators are speaking to witnesses.

This is the first accident of its kind in the Old Port.