BEIRUT (Reuters) - A ceasefire took effect on Thursday in a mountainous area of the Lebanese-Syrian border where Lebanon’s Hezbollah says it is on the verge of defeating Nusra Front militants in their last foothold at the frontier.

Lebanese and Hezbollag flags are seen in Juroud Arsal, Syria-Lebanon border, July 25, 2017. REUTERS/Mohamed Azakir

The ceasefire began at 6 a.m. (0300 GMT), halting fighting on all fronts in areas near the Lebanese frontier town of Arsal where Hezbollah launched its assault on Nusra Front jihadists on Friday, a military news service run by Hezbollah reported.

A source familiar with negotiations, brokered by a Lebanese internal security agency, said remaining Nusra Front fighters were willing to accept safe passage to Syria’s rebel-held Idlib and talks were continuing to agree the route they would take.

The news service of Hezbollah, a Shi’ite Muslim group, said the ceasefire deal included the release of five of its fighters held by the Sunni Muslim Nusra Front in Syria.

The head of Lebanon’s main security apparatus said the ceasefire deal would be “completed ... within days.”

“The militants and those civilians who wish to will depart for Idlib in an organized fashion under the supervision of the Lebanese state,” Major General Abbas Ibrahim said, quoted by Lebanon’s National News Agency.

The Lebanese Red Cross will be involved in the logistics, he said.

On the issue of the release of Hezbollah fighters by the militants, Ibrahim said: “The agreement is to clear Lebanese territory (of insurgents). Whoever benefits from that, there is no obstacle.”

In a speech late on Wednesday, Hezbollah leader Sayyed Hassan Nasrallah said talks had begun between Lebanese officials and the Nusra Front on Tuesday.

Nasrallah said on Wednesday his group was close to defeating the Nusra Front militants, saying they had “effectively lost” most of the land they held in the barren, mountainous border region known as Jroud Arsal.

Security sources say some two dozen Hezbollah fighters have been killed overall, and nearly 150 militants.

Islamic State militants in an adjacent area of the border zone are expected to be targeted in the next phase of the operation unless they agree to withdraw.

The Nusra Front was al Qaeda’s official wing in the Syrian war until last year when it formally severed ties to the global jihadist network and rebranded itself. It now fights as part of the Tahrir al-Sham Islamist alliance, which it dominates.

Hezbollah has played a major role in fighting militants in the border region during Syria’s six-year-old civil war in support of President Bashar al-Assad.

The Arsal region witnessed one of the most serious spillovers of the Syrian civil war into Lebanon when Nusra Front and Islamic State militants briefly overran the town of Arsal, abducting dozens of Lebanese soldiers and policemen.

Islamic State is still holding nine Lebanese soldiers captured at that time. Their fate is unknown.