DUBAI, United Arab Emirates (AP) — The United States and Iran reached an initial agreement Monday that would extend their shaky ceasefire and lead to the reopening of the Strait of Hormuz, but significant challenges remain to ending the war, including whether Israel will continue its offensive in Lebanon.

READ MORE: Deal is reached to end Iran war and Trump orders stop to U.S. naval blockade

Details of the deal were not immediately released, but it appeared that it would not be implemented until it is signed, which mediator Pakistan said would happen Friday in Geneva. Even if the strait — a crucial waterway for the world's oil and natural gas — fully opens then, it will likely take months for the global energy crisis sparked by its closure to ease.

Israel's defense minister said Monday that the country wouldn't withdraw from land seized in Lebanon, where Israel is fighting the Iranian-backed Hezbollah militant group. Israel joined the U.S. in launching the war on Feb. 28, but it is not party to the deal. A spokesman in Prime Minister Benjamin Netanyahu's office said Israel will continue to defend itself against any threat to its security.

That alone could scupper the deal, since Iran has insisted any agreement to end the war include an end to the fighting in Lebanon.