U.S. Vice President JD Vance speaks with the media as he arrives at Joint Base Andrews, Maryland, on May 28. Reuters-Yonhap

WASHINGTON — The United States and Iran have signed a memorandum of understanding to end a near four-month war, senior U.S. officials said on Monday, adding that a formal signing ceremony would take place on Friday and shipping traffic in the Strait of Hormuz would significantly but gradually ramp up.

The memorandum of understanding has been signed by President Donald Trump and Vice President JD Vance and Iranian parliament speaker Mohammad Bagher Qalibaf, one U.S. official said.

After weeks of negotiations, the news that Washington and Tehran had agreed to end the war brought relief to markets, although risks remain given the pact defers potentially complicated talks on containing Tehran's nuclear program.

While still a framework, the deal marked the biggest breakthrough toward resolving the conflict that has killed thousands and upended energy markets since it began with joint U.S.-Israeli strikes on Iran in February.