Israel and Lebanon's Hezbollah agreed to a ceasefire on Friday, after a sharp escalation in fighting threatened to unravel a fragile regional truce, a day after the United States and Iran signed an agreement to end the war.

A source familiar with Hezbollah confirmed to Middle East Eye that the ceasefire, which went into effect at 4pm local time, was reached after intensive calls and deliberations led by the US and Iran.

The source said the agreement came after Tehran threatened not to attend talks with the US in Geneva following the Israeli attacks in Lebanon.

"The ceasefire is contingent on Israel adhering to it," he said.

A senior Israeli official told Reuters that Israel and Hezbollah were in a ceasefire as long as Hezbollah does not attack Israel, adding that Israeli forces would stay in areas they have occupied in south Lebanon.