The ex-wife of Islamic State group leader Abu Bakr al-Baghdadi, her children and the wife of another militant commander were released from custody in Lebanon on Tuesday. After an investigation, Lebanon’s judiciary found no grounds to charge the women with committing a crime, according to the Daily Star.

The General Security will now investigate whether the women and children can legally reside in Lebanon, but ISIS claimed that at least one of the women was in Lebanon living as a refugee. Saja al-Dulaimi, Ola Mithqal al-Oqaily and their children had been detained separately earlier this month, in a move Lebanese officials likely wanted use as leverage to secure the release of hostages in militant custody.

The Islamic State group, also known as ISIS or ISIL, and al Qaeda-affiliated Jabhat al-Nusra kidnapped at least 30 Lebanese security forces members and have already executed four. The women’s release came just days after ISIS militants executed one of the hostages and two days after Qatar announced it had ceased mediating the negotiations.

Jabhat al-Nusra militants executed Lebanese police officer Ali Bazzal on Sunday, according to the Daily Star. A photo released by militants showed an assault rifle pointed to his head; he was likely shot. Al Qaeda’s affiliate in Yemen recently denounced the gruesome practice of beheading hostages, an execution method commonly used by ISIS militants.

Al-Oqaily’s husband, an ISIS commander who was previously thought to be a member of al Qaeda, threatened to terminate hostage negotiations if his wife and children were not immediately released, in a video statement released Friday. Anas Sharkas, who goes by the name Abu Ali Shishani, also urged Lebanese Sunnis in Tripoli to attack Shiite citizens and kidnap women and children in order to avenge his detained family. This was the first instance of the militant group trying to mobilize its supporters in Lebanon.

Baghdadi’s ex-wife was reportedly detained last month and accused of working with ISIS militants. She is thought to come from a family with ties to the militant group and her father was allegedly an ISIS emir, or commander, in Syria who was killed in 2013, according to al-Arabiya. A man named Mohammed Hamid al-Dulaimi is reportedly the head of communications and province coordination for ISIS.

Al-Oqaily was reportedly detained last week for forging identity documents in order to remain in Lebanon, though Sharkas claimed she had entered the country as a refugee.

“She was merely a refugee in a school, just like any other woman,” Shishani said in his video statement. “Why did they take her because of her husband? Damn you!”