The ruling means he is ineligible for refugee status, but federal officials would not say if he was detained or had been deported. Even his name was removed from the decision.

His lawyer declined to comment.

The case is a rare confirmation that a refugee claimant who successfully entered Canada had been involved with ISIS, although his past was quickly detected through security screening.

The Canadian embassy in Beirut approved his visa on May 5, 2015 after his wife’s sister, who lives in Canada, sent a letter of invitation. He made a refugee claim in September 2015.

WATCH: U.S.-backed Syrian forces declare victory over Islamic State

Three months later, federal officials intervened in his case, arguing he was disqualified from seeking refugee status because he was complicit in the crimes of ISIS.

The Immigration and Refugee Board agreed, and the decision was recently upheld by Patricia O’Connor of the Refugee Appeal Division, who rejected his claim that he had only worked for ISIS briefly and under duress.

According to the decision, the man was employed as a mechanic in Zahlé, a Lebanese city close to the Syrian border, when a customer asked him to repair vehicles at a location 30 to 40 minutes away.

He was eventually taken during the night to a hangar in a Sunni area where he was patted down for weapons. A Christian, he was forced to remove his cross and his cell phone was taken away.

“While ISIS had its own mechanics, he was needed to fix vehicles with problematic issues that no one else could repair,” the decision read. “He also supervised other mechanics and gave instruction on how to repair the vehicles which were used for military purposes.”

He was paid “a lot of cash,” the IRB said. “He said that they treated him well, paid him generously and trusted him to the extent that he was brought to ISIS locations in Lebanon and Syria.”

At one point, a Chinese visa was placed in his passport and he was told he was being sent to China to acquire materials, since ISIS thought “no one would suspect that a Christian would import things on their behalf.”

But the Lebanese armed group Hezbollah found out what he was doing and approached him at work, offering $1,000 a night to spy on ISIS. He said Hezbollah also threatened him.

Lebanon’s Bekaa valley, where a mechanic worked for ISIS before arriving in Canada in 2015 and making a refugee claim. EPA/NABIL MOUNZER

He ended his involvement with ISIS in May 2015 and came to Canada. While he said he had no other option but to work for ISIS, the IRB rejected that.

“He returned voluntarily over and over again to work on ISIS vehicles because he did not flee or attempt to flee ISIS,” the Refugee Board wrote in its decision.

“Instead of fleeing, he returned at least four to six more times to work for ISIS before he left the country. He returned to work for ISIS even when he touched blood in the vehicle and knew it was ISIS.”

The Canada Border Services Agency is also trying to deport a Jordanian who came to British Columbia and obtained refugee status, but in 2015 began posting ISIS propaganda online.