OTTAWA (Reuters) - Two Canadian citizens have safely departed Syria and are in Turkey after they were detained by a jihadist group last month as they tried to take two young children back to Canada, a government source said on Monday.

The source said Sean Allen Moore and Jolly Bimbachi had been handed over to Turkey after being freed by Hayat Tahrir al-Sham, a jihadist alliance spearheaded by the former al Qaeda affiliate in Syria.

Bimbachi and Moore, both residents of Chatham, Ontario, had flown to Lebanon late last year to reunite Bimbachi with her two children, Chatham politician Jeff Bultje said in a phone interview. The two boys had been taken from Canada by Bimbachi’s ex-husband on a trip to Lebanon in 2015 but had not been returned, according to Bimbachi.

The government source, who requested anonymity given the sensitivity of the situation, said Bimbachi and Moore had taken the two children and then tried to drive north through Syria, headed for Turkey. Bimbachi could not get the children out of Lebanon due to visa complications, said the source.

The detainment of the Canadians by Hayat Tahrir al-Sham “was not so much a traditional hostage-taking ... (the alliance) is essentially the functioning government in that part of Syria so they were detained, they were held. They were able to communicate with officials the whole time,” said the source.

The alliance had later returned the two boys, aged 8 and 7, to their father.

Bultje said Moore told him shortly before Christmas 2017, “everything went well, he was successful in what he was doing and he was going to be back in Canada in the New Year.”

Bultje and Moore knew each other from time spent doing humanitarian work together in Iraqi Kurdistan in 2016, he added.