MONTREAL -- Four men found in a shipping container at the Port of Montreal were granted release from detention on Friday as they await their refugee claim hearings.

Canada Border Service Agency agents in Montreal found the four men from Georgia as they searched a container in the port on July 20.

A security guard doing rounds at about 7 a.m. heard the men calling for help and saw a small white flag waving from a hole in the container, according to documents presented at the hearing.

The men, aged between 30 and 40, were suffering from dehydration and authorities said they'd been in the container for some time.

There is a publication ban on their identities and their reasons for coming to Canada.

Immigration and Refugee Board of Canada member Francois Milo said the men have valid passports and no criminal records at a detention review hearing.

He said they have been found eligible to make refugee claims and don't seem to pose an undue flight risk.

A lawyer for the men says they now all appear to be in good health.

"They seemed to be doing very well physically, there were no health problems following that adventure," Vincent Desbiens said after the hearing.

Through an interpreter, the men agreed to provide an address, show up for hearings when summoned, and notify authorities if they leave Canada.

The men will now await their hearings to learn if their asylum claims are accepted -- a process that could take up to a year, according to Milo.