Four men found in a shipping container at the Port of Montreal are believed to have spent as long as three weeks inside travelling to Canada.

The men, aged between 30 and 40 years old, were transported to a local hospital to be treated for dehydration. Urgences Santé said two of the men were in serious condition, having trouble breathing. They are now said to be in stable condition.

Stephane Smith, a spokesman for the Urgences Sante ambulance service, said it is not clear exactly how long the men were inside the container.

"Many days, the exact number, I don't know, but we're talking many, many days," Smith said in an interview.

The Hong Kong-registered OOCL Montreal left Hamburg, Germany 10 days ago, arriving in Montreal on Wednesday.

Border agents found the four men while searching containers at Montreal’s Cast Terminal. Authorities believe they entered the country illegally from Europe.

They will be handed over to border security officials and sent to a detention centre in Laval, Que. The Canada Border Services Agency (CBSA) is investigating potential ties to terror groups.

"As this is still under review by the CBSA, and for privacy reasons, we cannot give more information," the CBSA said in a statement.

The RCMP has intercepted about 3,500 asylum seekers coming into Canada to date, 2,500 of which are said to have entered through Quebec.

Refugee worker Rivka Augenfeld told CTV Montreal that marine stowaways are increasingly rare. She said shipping yards have heightened security, and carriers face increasingly steep sanctions for bringing undocumented people into Canada.

“The last time I heard, it was $7,000 a person. It could be more,” she said.

For Augenfeld, the incident Thursday harkens back to a time when more people risked their lives to travel to Canada inside marine cargo.

In 1996, Romanian stowaways were discovered on the container ship Maersk Dubai during a transatlantic trip to the Port of Halifax. The captain is said to have ordered them thrown overboard on a makeshift raft to avoid paying fines. He was later charged with first-degree murder.

“It is never clear whether people understand the potential consequences of what they are doing,” Augenfeld said. “It is terrible that people are so desperate that this is what they decide to do.”

With files from CTV Montreal and The Canadian Press