BEIRUT -- Sixteen Lebanese security forces personnel -- soldiers and police -- were released Tuesday as part of a prisoner exchange with Jabhat al-Nusra, al Qaeda’s branch in Syria. After more than a year of captivity, and months of negotiations mediated by Qatar, the prisoners were exchanged on the outskirts of Lebanese border town Arsal with the help of the Lebanese Army and Red Cross humanitarian organization.

“We thank Nusra… and we thank the Lebanese government,” one of the captives told Al Jazeera after his release.  

The security forces officers were freed in exchange for at least a dozen prisoners, including five women, who were being held in Lebanon. Saja al-Dulaimi, the ex-wife of Islamic State group leader Abu Bakr al-Baghdadi was among those released, following her arrest on entry to Lebanon last year. Her children, including the baby girl she gave birth to in prison in June, were included in the exchange.

After her release, she told Al Jazeera that she and her children were refugees and that her ex-husband, whom she had divorced six years earlier “was not [the ISIS leader] at the time” they were married.

Full terms of the deal have not yet been released, but the conditions of Syrian refugees in Lebanon is a major topic: The area near Arsal, by the border with Syria will be established as a permanent “humanitarian corridor” for refugees, according to Lebanese human rights lawyer Nabil al-Halabi.

The body of one hostage, Mohammad Hamieh, was also returned to Lebanese General Security Tuesday morning, signaling the start of the exchange. Al-Nusra fighters allegedly shot Hamieh in September 2014, a month after he was captured by al-Nusra and ISIS militants, along with 30 other Lebanese security personnel. Prior to Tuesday’s exchange, eight servicemen had been released and four were killed. The remaining nine hostages, believed to be with the Islamic State group, were not part of the deal.