The Immigration and Refugee Board has agreed to release, with conditions, an asylum seeker who nearly died crossing into the country from the United States earlier this month.

Mamadou, 46, is originally from Ivory Coast, but had been living in the United States for ten years. He appeared Thursday at a detention review hearing at the IRB offices in Montreal.

CBC News is referring to Mamadou by his first name only because of a publication ban, which also prevents us from reporting the reasons why he fled his country of origin and why he is now seeking protection.

A New York cabbie until just weeks ago, Mamadou lived in a state of legal limbo.

When Donald Trump became president, he feared for his safety and fled north.

First he tried to enter Canada legally at the Lacolle, Que., border crossing, but he was turned back.

Under the Safe Third Country Agreement, which has been in effect since 2004, asylum seekers must make refugee claims in the first safe country in which they find themselves. Refugees who first arrive in the U.S., therefore, can't then receive asylum status in Canada.

The day after being turned away at Lacolle, Mamadou crossed into Canada illegally, nearly freezing to death in the process. He was found unconscious and taken to hospital, where he was arrested and detained.

Mamadou still faces deportation to the Ivory Coast, although it's unclear when that will happen.