Two Canadians made it safely to Turkey and are on their way back to Canada after they were detained by an al Qaeda-affiliate in Syria.

Jolly Bimbachi of Chatham, Ont., travelled to Lebanon in November, along with Sean Allen Moore, who had humanitarian experience in the region.

“This mom wanted her kids back and Sean was willing to help with that,” says Jeff Bultje, a friend of Moore.

Their attempt to spirit the two boys out of Lebanon in mid-January failed when they were detained by Hayat Tahrir al-Sham.

Middle East expert Bessma Momani says the jihadist group has an arm that acts like a municipality in the region.

“They collect garbage, they collect taxes, they collect fees, and they provide a so-called modicum of governance,” she said. “And they can be very cruel"

In a statement posted to the website of the so-called Syrian Salvation government, Mohammed Ahmed Alsheikh alleged that Bimbachi and Moore “illegally entered ... from Qalaat Al-Madiq area in Hama Province around mid-January 2018.”

The statement, which was translated from Arabic by CTV News, goes on to say that they reached out to Canada and Turkey and had a “positive interaction.”

“We worked to secure your citizens and we received them and provided them with what they need,” Alsheikh’s statement says. “They were only guilty of entering the country illegally.”

A senior government source says they were in constant communication with Bimbachi using the messaging platform WhatsApp.

Global Affairs Canada said it is “relieved that two Canadian citizens have safely left Syria,” and warns that it is not a safe country in which to travel.

With files from CTV’s Glen McGregor and Michel Boyer