VANCOUVER - His deportation may be only days away and an immigration board official agrees Lai Changxing is a flight risk who likely consorted with criminals, but the Chinese fugitive has been ordered released.

Still, Lai's freedom may be short-lived as the Federal Court of Canada hears an application to stay his deportation order on Thursday. If Lai's request for a stay is turned down, he could be on a plane back to China as early as next week.

Immigration and Refugee Board member Geoff Rempel ordered Lai released on Wednesday, saying he was relying on Lai's record while the Lai battled through lengthy legal procedures to try to stay in Canada.

"Mr. Lai, over the last decade, has demonstrated a long history of showing up as required for immigration proceedings," said the adjudicator.

"Overall Mr. Lai has demonstrated very positive compliance with previous conditions."

Rempel released Lai with an 11 p.m. to 8 a.m. curfew and an order to stay away from certain gang members.

Lai is wanted in China on allegations he was the kingpin in a massive smuggling operation that siphoned millions from the coffers of the Chinese government.

Rempel conceded that Lai may have been involved in criminal activity in Canada, "but Lai has not been arrested on criminal charges, much less convicted."

"I accept there is a risk of flight in Mr. Lai's case. But I am satisfied that adequate terms and conditions will mitigate that risk."

A lawyer for the border service had argued that Lai's links to organized crime in Canada makes him a serious flight risk.

Vancouver Police Det. James Fisher testified earlier in the hearing that Lai's connections with the Big Circle Boys gang could enable him to get fake documents good enough to fool border officials.

Rempel also agreed Lai had ample opportunity to get documents that would allow him to escape from Canada.

"But he hasn't done so -- even when he was most at risk in 2006."

Officials with Canada Border Services Agency arrested Lai two weeks ago, a day after a second pre-removal risk assessment said China would not seek the death penalty or torture Lai if he was returned to face charges.

The first risk assessment released in 2006 also said he was safe to be returned, but a Federal Court overturned that decision.

Rempel said he based his release decision Wednesday on the fact that Lai didn't run five years ago when he was under the same pressures.

The adjudicator said the onus is on the government to prove the Chinese businessman was a potential flight risk in order to justify depriving him of his liberty, and they didn't do that.

In fact, Rempel didn't even bother listening to Lai's lawyer argue for his release at the hearing but went directly to his decision.

Lai was ordered released last week by an immigration board, but border service officials went to Federal Court and the court granted a temporary stay holding him in custody.

Outside the hearing Wednesday, Lai's lawyer Darryl Larson said officials with CBSA told him they wouldn't be seeking to detain Lai again.

Because Thursday's hearing will determine whether Lai can stay or go, CBSA counsel Murray Wilkinson asked that he be held under house arrest and that agency investigators be allowed to search Lai's home for fake documents that the fugitive might use to escape.

"You raised the spectre in your decision about Mr. Lai having a fraudulent document," Wilkinson pointed out.

Rempel refused.

Larson said Lai will spend what could be his last hours in Canada talking to his lawyers.

"I'm sure there are some people that he would like to see. I don't know that he's going to see them to say good bye because I think he's optimistic. I'm reasonably optimistic that he'll get a stay as well."

A CBSA lawyer told the hearing earlier that if the Federal Court rules against a stay of deportation, Lai will be re-arrested and he could be removed from Canada as soon as July 25.