BEIRUT (Reuters) - A convoy of Islamic State fighters and their families left the Lebanon-Syria border region on Monday under Syrian military escort, surrendering their enclave and traveling to eastern Syria after a week-long battle.

A line of ambulances and buses were shown on Syrian state television driving slowly through the arid countryside, the border’s pale hills behind them, as they departed.

The transfer ends any insurgent presence on the border, an important goal for Lebanon and Hezbollah, and marks the first time Islamic State has publicly agreed to a forced evacuation from territory it held in Syria.

Islamic State agreed a ceasefire deal that took effect on Sunday with the Lebanese army on one front and Hezbollah with the Syrian army on the other. The militants had lost much of their mountainous enclave straddling the border since the two offensives began on opposite sides of the frontier.

The Lebanese army has said its offensive against Islamic State did not involve coordination with the Syrian army or Hezbollah.

Lebanon’s Hezbollah has been a close ally of Syrian President Bashar al-Assad through Syria’s six-year war. The Iran-backed Shi’ite group has played a major role fighting Sunni militants at the border and has sent thousands of fighters into Syria to support Assad’s government.

The leader of Hezbollah, Sayyed Hassan Nasrallah, said on Monday that the group had accepted Islamic State’s evacuation partly in order to find out the fate of nine Lebanese soldiers in Islamic State captivity since 2014.

The convoy being transferred into Syria included 308 militants with their small arms and 331 civilians, Nasrallah said in a televised speech.

Islamic State will hand over one Hezbollah captive and the bodies of some Hezbollah forces and one Iranian fighter killed in battles across Syria, he said.

At the last stage of the deal, the two sides would exchange the bodies for the convoy of militants at a transit point in Syria, Nasrallah said.

Eleven Hezbollah fighters and seven Syrian soldiers had been killed in their offensive in the western Qalamoun region on Syria’s side of the border, he said.

The border battle has ended in “fully liberating Lebanese land and securing the border with Syria,” he said.

Both Hezbollah and Lebanese officials have billed the evacuation as a surrender by Islamic State.

Slideshow ( 5 images )

“We do not bargain. We are in the position of the victor and are imposing conditions,” the head of Lebanon’s internal security agency, General Abbas Ibrahim, said on Sunday.

A commander in the pro-Assad military alliance said Syria and Hezbollah had accepted Islamic State’s evacuation rather than a fight to the end, to avert a bloody war of attrition.

Islamic State fighters were sheltering among civilians and to complete the offensive would have involved great bloodshed, the commander said.

Slideshow ( 5 images )

HEAVY SECURITY

Syrian state television and a Hezbollah military media unit said the convoy left the western Qalamoun for its destination in eastern Syria.

The evacuees will travel across Syria under heavy security escort to Islamic State lines near Al-Bukamal in the eastern province of Deir al-Zor, a Lebanese security source said.

The Syrian army and Hezbollah were communicating with Islamic State near Al-Bukamal to arrange the transfer of the convoy into jihadist territory, the source said.

Islamic State fighters were earlier seen burning heavy equipment and arms which they left in the border enclave.

Northeast Lebanon saw one of the worst spillovers of the Syrian conflict in 2014, when Islamic State and other militants briefly overran the border town of Arsal. The fate of nine Lebanese soldiers that Islamic State took captive in 2014 had remained unknown until Sunday.

Ibrahim, the Lebanese general, said the troops were almost certainly dead after recovering remains thought to belong to them. The news and the evacuation deal have sparked some public outcry in Lebanon that authorities had not been able to retrieve the soldiers alive.

Earlier this month, Nusra Front militants and a Syrian rebel group withdrew from their footholds along the border after accepting similar evacuation deals.

Those agreements came after a brief Hezbollah offensive that began at the end of July against militants of the ex-Nusra Front, which was al Qaeda’s affiliate in Syria until last year.

Hezbollah has maintained a strong presence in the parts of Syria near the border with Lebanon for years, helping Assad capture several rebel-held towns and villages there.

Inside Syria, Islamic State is retreating on many fronts, losing territory to separate offensives, including by the Russian-backed Syrian army and U.S.-backed militias.