People make their way through the rubble of a destroyed building in southern Lebanon. [Mahmoud Zayyat, AFP]

The EU's top officials Monday welcomed a deal between the United States and Iran to end the Middle East war, saying Europe was ready to contribute to "a lasting peace".

"I look forward to an end to this costly war and to the full restoration of freedom of navigation in the Strait of Hormuz," Antonio Costa, the president of the European Council representing member states, wrote on X.

"Weapons must now fall silent," Costa urged, saying the "European Union is ready to contribute to advancing a comprehensive strategy for lasting peace across the Middle East."

The United States and Iran said they had reached a deal to end the Middle East war on all fronts, including Lebanon, and reopen the vital Strait of Hormuz, though they offered little indication on the thorny question of Tehran's nuclear programme.

European Commission chief Ursula von der Leyen stressed the "priority now is its swift and full implementation" -- calling on "all parties to respect Lebanon's sovereignty and territorial integrity and implement a genuine ceasefire."

"There can be no peace in the Middle East while Lebanon is in flames," she warned, adding that Hormuz reopening was "essential for regional stability and the global economy" and that a final deal "should end Iran's nuclear and ballistic programmes and its destabilising activities in the region."

Heading into talks with the bloc's foreign ministers, EU top diplomat Kaja Kallas said ministers would discuss Monday "how the EU can be closely involved in the next phase."