A ceasefire between Israel and Lebanon's Hezbollah will take effect on Wednesday after both sides accepted an agreement brokered by the United States and France, U.S. President Joe Biden said on Tuesday.

The accord, clearing the way for an end to a conflict that has killed thousands of people since it was ignited by the Gaza war last year, was designed to be a permanent cessation of hostilities, Biden said in remarks at the White House.

Fighting across the Israel-Lebanon border will end at 4 a.m. local time (0200 GMT), Biden said.

"This is designed to be a permanent cessation of hostilities," he said. "What is left of Hezbollah and other terrorist organizations will not be allowed to threaten the security of Israel again.”

Israel will gradually withdraw its forces over a period of 60 days as Lebanon's army takes control of territory near its border with Israel to ensure that Hezbollah does not rebuild its infrastructure there, Biden said.

"Civilians on both sides will soon be able to safely return to their communities," he said.

Lebanese Foreign Minister Abdallah Bou Habib earlier said the Lebanese army would be ready to have at least 5,000 troops deployed in southern Lebanon as Israeli troops withdraw.

Israeli Prime Minister Benjamin Netanyahu earlier said he was ready to implement a ceasefire deal and would respond forcefully to any violation by Hezbollah, declaring Israel would retain "complete military freedom of action."

Beirut

Netanyahu, who faces some opposition to the deal from within his coalition government, said the ceasefire would allow Israel to focus on the threat from Iran, replenish depleted arms supplies and give the army a rest, and to isolate Hamas, the militant group that triggered war in the region when it attacked Israel from Gaza last year.

"We will enforce the agreement and respond forcefully to any violation. Together, we will continue until victory," Netanyahu said.

"In full coordination with the United States, we retain complete military freedom of action. Should Hezbollah violate the agreement or attempt to rearm, we will strike decisively."

Netanyahu said Hezbollah, which is backed by Iran and allied to Hamas, was considerably weaker than it had been at the start of the conflict.

"We have set it back decades, eliminated ... its top leaders, destroyed most of its rockets and missiles, neutralized thousands of fighters, and obliterated years of terror infrastructure near our border," he said.

(Writing by Tom Perry, Michael Georgy, Angus McDowall and Simon Lewis; additional reporting by Steven Scheer, Emilie Madi, Laila Bassam, Emma Farge, John Irish, Emily Rose and Cecile Mantovani; Editing by Ros Russell, Angus MacSwan, William Maclean and Rod Nickel)