NOUAKCHOTT, Mauritania - A Mauritanian official says a 24-year-old Canadian man sentenced to 18 months in prison for alleged ties to al-Qaida's North Africa branch has been freed.

The official, who insisted on anonymity because he was not directly responsible for the release, said Aaron Yoon would be kept under police surveillance until he was sent back to Canada. The official did not say when that would happen.

Yoon travelled to the region with two other Canadians who were implicated in a large-scale terror attack on a natural gas plant in southeastern Algeria earlier this year. He was arrested in Mauritania in December 2011.

Earlier this month, a court ordered his release after he was sentenced to 18 months in prison -- the same amount of time he had already served.