A Canadian jailed in Mauritania for attempting to join an Al-Qaeda training camp in neighboring Mali has been released and is back in Canada, local media said Friday.

Aaron Yoon, who is of Korean descent and converted to Islam from Catholicism, arrived in Toronto, said Canada's public broadcaster.

He had served nearly two years in Nouakchott after being convicted in July last year when he was 24.

Yoon had been arrested in December 2011 when he tried to visit the camps of Al-Qaeda in the Islamic Maghreb (AQIM) in Mali, according to the indictment against him.

He denied any link to terrorism, saying he had come to Mauritania from Morocco to study the Koran and learn Arabic, but Mauritanian authorities maintained he had "strong links with AQIM terrorists and his plan to join the movement is indisputable."

Mauritania shares a 2,200 kilometer (1,350 mile) border with Mali, where a French-led military operation was launched against armed Islamist groups in January, driving them out of cities in the country's vast desert north.

The same month, two of Yoon's former schoolmates who grew up with him in sleepy London, Ontario and travelled abroad with him were among 29 militants and their 38 hostages killed during a days-long siege and rescue operation at an Algerian gas plant.

Canadian police and intelligence have said they may wish to speak with Yoon.