A young Chinese asylum seeker who boarded a flight from Hong Kong to Canada disguised as an elderly white man has been released from Canadian custody after more than three months in detention, his lawyer said Friday.

Lawyer Daniel McLeod said his client was released on condition he post a $5,000 bond and report weekly to the Canada Border Services Agency.

"He's very relieved. He's been kinda stoic about the whole thing, he's quite young," said McLeod. "It's difficult for anyone to be prison for three months in a medium security prison when they haven't committed any crimes. And in an environment where there's practically no one he can talk to in his own language."

The identity and age of the man, who did not appear in the Immigration and Refugee Board hearing but was listening to the translation through a telephone, cannot be revealed due to a publication ban.

McLeod said someone has agreed to post the bond and provide accommodation, but could not provide further details because of the publication ban.

The migrant boarded an Air Canada flight in Hong Kong wearing a remarkably detailed silicone mask. A government intelligence report says he removed the disguise in a washroom mid-flight before landing in Vancouver, British Columbia, Oct. 29.

The Canadian Border Services agency said the man presented a Peoples Republic of China identity card upon arrival in Vancouver.

A Hong Kong official told the AP that the impostor was a mainland Chinese citizen transiting through Hong Kong. The official declined to be named because she is not authorized to release the information.

The official said the Chinese man likely escaped detection because he used his own travel documents and a genuine boarding pass when clearing immigration checkpoints in Hong Kong, and then swapped travel papers with a someone in the transit lounge just before boarding the flight to Vancouver.

A Canadian government official, who provided the Border Services alert to The Associated Press, said a U.S. passport was involved.

Immigration and Refugee Board adjudicator Anita Merai-Schwartz said during her ruling Thursday that the migrant paid to enter Canada using money from his parents.

"Eight individuals apparently associated with this operation have been arrested in Hong Kong. Thus I do make the finding that in this regard you did use a human smuggling operation to get to Canada," Merai-Schwartz said.

McLeod said his client will apply for refugee status_a process that can take as many as two years.

Due to Canada's refugee and immigration laws, the migrant cannot be prosecuted for entering Canada illegally since he has claimed asylum.

As a refugee claimant he is able to apply for a work permit.