The discovery of four men stowed away in a shipping container in the Port of Montreal Thursday show just how desperate asylum seekers are getting, says immigration lawyer Eric Taillefer.

The four men, who are believed to be in their 30s and 40s, were taken to hospital and treated for heat stroke and dehydration.

The stowaways arrived in the Port of Montreal in a container that came off a Hong Kong-flagged ship that had last visited Hamburg, Germany.

Where it may have been before then, and at which port of call the men came aboard, is still unknown.

"I guess it was just a matter of time before people were desperate enough to actually try this again," Taillefer said.

"In a way, it's not more different than what we've seen at the border in the past few months. It's just much more dangerous," he added.

The men were found by a Port of Montreal container checker after they made noise and stuck a white flag out of the shipping container.

"I'm sure he was in shock because it's been a long time since we've had stowaways in Montreal," Albert Batten, head of the port's container checkers union, told CBC News.

Albert Batten said one of his union members found the stowaways when they pushed a white flag out of the shipping container they were in. (CBC)

Nine people were found in a shipping container in the Port of Montreal in 2010.

Those people came aboard in Casablanca, Morocco, and believed they were headed for Europe, but ended up in Montreal.

Batten said enhanced security measures at the port may be one of the reasons fewer people are choosing to enter Canada in such a grueling way.

Why leave Europe?

If the four men were found in the shipping container which came from Hamburg, Germany. (Radio-Canada) If the men came aboard in Europe, Taillefer says they may have been trying to avoid the European Union's complicated rules for claiming asylum.

A further complication is the sheer number of people seeking asylum in Europe.

"There have been so many refugee claims in the last few years that it's getting difficult to make a claim," Taillefer said.

What's next for these men?

The men who were found Thursday will now pass through the same process as asylum seekers who enter Canada at a land crossing.

If they have identification, they will undergo a background check and then be released to the YMCA residence on Tupper Street in Montreal.

If they don't have identification, they will be detained until their identity is confirmed and background checks can be performed.

At the YMCA, social workers will help them integrate into Canada and they will start receiving welfare and have access to their first work permit.

According to Immigration, Refugees and Citizenship Canada, from January to June 2017, only five people have claimed asylum in Canada through a marine port of entry, and they were all in Quebec.

Asylum claims continue to rise in Quebec — in January 2017 there were 270 asylum claimants, which rose steadily to 750 claimants by June.

A total of 2,875 people have claimed asylum in Quebec in the first six months of 2017.