Ali Medlej, one of two London, Ont. men who died carrying out a terrorist attack on an Algerian gas plant earlier this year, was arrested and held for 45 days in neighbouring Mauritania, CBC News has learned. (Yearbook Photo)

CBC News has learned that Ali Medlej, one of the two former London, Ont., high school friends linked to al-Qaeda and killed during an attack on an Algerian refinery three months ago, had been arrested a year before the bloody gas plant siege but was later released.

It is a twist of fate that could have kept him from the attack — and his own death.

Indeed, a third high school friend arrested around the same time as Medlej and not released, is still alive in jail in the Islamic Republic of Mauritania.

Sources tell CBC News that Medlej was one of 36 people arrested by Mauritanian authorities in late 2011 during a broad round-up of suspected al-Qaeda extremists in the North African nation.

Barely four years out of high school at the time, Medlej was held and interrogated for about 40 days, and then simply released into the deserts of Mauritania.

Ordinarily, Canada’s diplomats in the region would have intervened on behalf of one of their own citizens arrested with a Canadian passport and a student visa.

Canadian officials not told of arrest

But sources tell CBC News that no one told Canadian officials there about Medlej’s arrest and detention — not Ali Medlej, not his family, not Mauritanian officials.

By the time they found out, it was too late – Medlej had slipped away on route to his murderous mission at the Algerian refinery in January this year.

Police and intelligence sources say it is likely that Medlej and high school pal Xris Katsiroubas blew themselves up in a suicide finale to the four-day gas plant siege by the two Canadians and 30 other militants linked to al-Qaeda.

Both were under 25 when they died.

A third former high school classmate, Aaron Yoon, was arrested in the same al-Qaeda sweep that nabbed Medlej in Mauritania.

But unlike his pal, Yoon was not released, instead sentenced in 2012 to two years in jail allegedly for having ties to a terrorist group and posing a danger to the national security of Mauritania.

There is no evidence Yoon ever planned to participate in the Algerian refinery attack, even if he had not be incarcerated, and he has denied any involvement in terrorist activities.

Fourth high school friend missing

A fourth member of the group of London school chums, Ryan Enderi, is missing.

The arrest and release of Medlej more than a year before the refinery attack is only the latest twist in this bizarre story of the four friends from London South Secondary School who left their comfortable suburban neighbourhoods and backyard swimming pools for the sands of North Africa.

It is also a story that continues to raise many disturbing questions amid an increasingly deafening silence from Canadian officials.

First and foremost, did someone drop the ball?

CBC News has confirmed that CSIS interviewed friends, family and other associates of several of the boys as far back as 2007 after the parents of one of the then high school teenagers called the police.

Sometime later, CSIS investigators apparently became sufficiently concerned about what the boys were up to that the intelligence service called in the RCMP to conduct a criminal investigation.

CBC News has also confirmed the RCMP were interviewing former acquaintances of the four in June 2012.

But that’s more than a year after all four had left the country, and only months before the gas refinery attack.

Was it all a bungled surveillance and investigation by the RCMP or CSIS – or both?

Or is it an alarming fact of religious radicalization that police had no grounds to intervene until it was too late?

And who’s to blame for radicalizing the boys?

London resident believed responsible for radicalization

Informed sources have told CBC News that investigators now believe one person in the London area was largely responsible for turning the four teenagers – including a Greek Orthodox and a Korean Catholic – into Islamic radicals, at least two of whom who were prepared to trade their high-school T-shirts for suicide bomb vests.

Who is he and why haven’t the police arrested him? Or did they lose track of him, too?

Finally, parents everywhere must be wondering what law enforcement and other government agencies are doing to help ensure no one turns their own kids into would-be terrorists.

So far, the RCMP has said only that their investigation is continuing, and they are asking the public for information on the London four.