NOUAKCHOTT, Mauritania (AP) — A young Canadian man who headed to North Africa to study the Quran is now serving two years in a Mauritanian prison after authorities say he was recruited to train at an al-Qaida camp in northern Mali, an official said Thursday.

Aaron Yoon, 24, reportedly had travelled to Morocco with two Canadians accused of taking part in the terror attack on a BP-operated natural gas plant in southeastern Algeria earlier this year.

The Canadian Broadcasting Corp. reported all three were once friends from the same London, Ontario high school.

Yoon's relatives have told the CBC, however, that he had not been in contact with the two other terror suspects in more than a year.

Mauritanian authorities say Yoon had ties to al-Qaida's affiliate in Africa — al-Qaida in the Islamic Maghreb, or AQIM.

"This Canadian citizen stated to investigators that he had come from Morocco to study the Quran and Islamic law before being indoctrinated by salafist jihadists who recruited him to join AQIM in the north of Mali," said a Mauritanian judicial official who spoke on condition of anonymity because he wasn't authorized to speak to journalists.

Yoon was convicted last July on charges of having ties to a terrorist group and of posing a danger to national security, the Mauritanian official said.

When asked about Yoon, Canada's foreign affairs department would only confirm that a Canadian had been detained and declined further comment.

The Jan. 16 attack and four-day siege on a gas facility in southern Algeria ended with the deaths of 37 hostages and 29 terrorists.

Chad's government claimed that the mastermind of the attack, Moktar Belmoktar, has been killed in fighting in northern Mali, but the claim has not been independently verified.

___

Associated Press writer Rob Gillies in Toronto contributed to this report.