BEIRUT — The remains of eight Lebanese soldiers kidnapped by the Islamic State group three years ago were located Sunday, a senior Lebanese official said, in a negotiated deal that followed a military offensive to drive the militants out of the border area with Syria.

Abbas Ibrahim, the chief of Lebanese General Security, said six bodies buried in Lebanon near the border with Syria were removed. He said the operation continued to pull out two more bodies but the fate of a ninth soldier remained unknown.

The soldiers’ remains were transported later Sunday to Beirut’s military hospital for DNA tests to determine their identities.

Locating the soldiers’ remains was part of a deal that comes a week after the Lebanese military launched a campaign to drive out IS militants from some 120 square kilometers (46 square miles) in a rugged mountainous area that straddles the Lebanese-Syrian border. Separately but simultaneously, the Lebanese Hezbollah militia, in cooperation with the Syrian army, launched another offensive to pressure the IS militants in Syrian territories along the same border area.

The U.S-backed Lebanese army denies it coordinated with the Syrian government.

The deal also entails the transfer of remaining IS militants on both sides of the border to eastern Syria’s Deir el-Zour province, which is mostly controlled by the extremist group. The Syrian government, backed by Russian air power and Iranian-organized militias, is preparing an offensive to recapture the oil-rich province.

After a week of fighting, cease-fires were announced on both sides of the border earlier Sunday. The Lebanese army said the halt in fighting, which came after 100 square kilometers (38 square kilometers) were cleared of militants, was to allow for negotiations to determine the fate of the soldiers.

Hezbollah and Syrian media said the cease-fire was to allow for the comprehensive deal.

Hezbollah, which Western nations view as a terrorist organization, has been fighting alongside President Bashar Assad’s forces inside Syria since 2013.

Lebanon’s main political factions are bitterly divided over the war in neighboring Syria, and many would fiercely object to any direct cooperation with Assad’s government. Lebanese were also divided over the outcome of the deal, some taking to social media to criticize the negotiations with the militants. Others hailed the deal and evacuation of the militants as a victory.

Ibrahim said after IS militants were driven into Syria under pressure from the Lebanese military, the deal became possible. He said detained militants revealed the location of the soldiers’ remains. They were still wearing their military uniforms, he said.

Ibrahim said he was part of the negotiations over the fate of the soldiers, but Hezbollah and Syria sorted out the larger deal.

“The first article in this deal was (determining) the fate of the soldiers,” Ibrahim told reporters from outside the tents set up for years by the families of the missing soldiers looking for their relatives. “This case … has regrettably been closed on a dark note.” Relatives of the soldiers broke down in tears and declined to talk to the media.

The soldiers were among more than 20 kidnapped in 2014 when militants linked to al-Qaida and IS overran the border town, Arsal. Most of those kidnapped were later released. It was the most serious spillover into Lebanon from the six-year Syrian war. Al-Qaida-linked militants were evacuated from the area earlier this month, following a Hezbollah offensive there.

The Syrian official news agency SANA said the area along the border would be declared free of IS militants soon. A Syrian military official told the agency that the evacuation of IS militants, negotiated by Hezbollah, has been approved.

Al-Ikhbariya quoted an unnamed Syrian field commander as saying the militants have been driven out of some 200 square kilometers (77 square miles) in Syria. Syrian media say around 400 militants and their families are expected to be evacuated toward Deir el-Zour, though it was not clear when that would take place.

The Central Military Media, an outlet run jointly by Hezbollah and the Syrian army, said according to the cease-fire deal, buses will transport IS members and their families to Boukamal, the Syrian town in Deir el-Zour, along the Iraqi border.

The bodies of five Hezbollah fighters were also brought back to Lebanon as part of the deal.

As negotiations for the evacuation of IS militants to Deir el-Zour were underway, Syrian troops backed by Russian air power and Iranian-backed militias pushed their way into the province from Sukhna in the country’s center.

The government troops and its allied militias have been moving toward Deir el-Zour from three different angles — in central, northern and southern Syria. The new advances bring the pro-government troops about 65 kilometers (40 miles) from the provincial capital, where IS militants have besieged government troops for years. IS controls most of the oil-rich province.

Russian officials have said the priority is now to aid government troops in recapturing Deir el-Zour, which is southeast of Raqqa and where U.S-backed Syrian opposition forces are battling Islamic state group militants.

U.S-backed forces, known as the Syrian Democratic Forces, are also making a bid for Deir el-Zour province, raising concerns of a potential friction with the Syrian troops.

Late on Saturday, Islamic State militants attacked a base of the SDF forces in Shaddadi town, about 120 kilometers (74 miles) north of Deir el-Zour. Bassem Aziz, of the SDF media center in the area, said 12 IS militants attacked their offices, including four suicide bombers. Aziz said the attack continued into the early hours Sunday and was foiled, leaving the attackers dead and a number of SDF fighters injured.

___________

Associated Press writer Albert Aji contributed to this report from Damascus, Syria.