The deportation order for a 16-year-old Syrian who arrived at the Canada-U.S. border last month has been cancelled and he has been approved to work toward permanent residency on humanitarian and compassionate grounds, his lawyer says.

Mohammed (we are not using his last name to protect his safety) has been granted first-stage approval by Immigration Minister John McCallum, according to lawyer Aviva Basman. This means the teen must still go through all of the required medical, security and background checks before permanent residency is granted.

Basman had appealed to McCallum to look into Mohammed's case, and had he not opted to process the teen's application directly on compassionate and humanitarian grounds, the minister could have allowed the teen to make a refugee claim, she said.

McCallum's decision, she said Thursday, "is really good news. We're thrilled."

A spokesperson for McCallum would not confirm that the minister has intervened in the teen's case.

Aviva Basman-refugee lawyer

Aviva Basman of the Refugee Law office appealed to Minister of Immigration John McCallum and the Liberal government to allow the teenager to apply for refugee status in Canada. (Maureen Brosnahan/CBC)

Basman had a brief conversation with Mohammed, who she said is "very relieved and excited."

She will meet with him Friday with an interpreter present to explain all of the details.

"But he understands that he gets to stay in Canada," Basman said.

The teen arrived at the border in Fort Erie, Ont., last month, claiming refugee status. Instead, he was taken into custody, placed in isolation for three weeks at an immigration holding centre in Toronto and then ordered deported on the grounds that Canada no longer accepts refugees who come through the United States.

His lawyer argued that as an unaccompanied minor he should be allowed to remain in Canada and claim refugee status.

Mohammed's family fled Syria for Egypt after the war began. But when Mohammed turned 16, his residency permit in Egypt expired. He faced being sent back to Syria and being conscripted into the military.

Fearing that, his parents flew with him to the United States and then arranged to get him to the Canadian border. They believed Canada's openness to accept Syrian refugees meant he would be safe here. Meanwhile, they flew back to Egypt.

Mohammed was only allowed outside for 15 minutes twice a day during his detention, he told CBC News earlier this week.

He was to be deported to the United States on Feb. 18. However, on Monday, days before the deadline, the border agency delayed the order for one week.

Mohammed will stay at Romero House, a Toronto shelter for refugees, for the next while, according to Basman. He is also preparing to enrol in a local school.