US and Iran have agreed to an immediate and permanent end to military operations, marking a major step toward ending months of conflict in the Middle East.

The United States and Iran agreed to a peace deal and an "immediate and permanent" end to military operations on all fronts, including Lebanon, signalling the apparent end to more than three months of war in the Middle East.

The initial announcement from mediator Pakistan was quickly confirmed by Washington and Tehran, and an official signing ceremony was scheduled for June 19 in Switzerland.

"The Deal with the Islamic Republic of Iran is now complete," US President Donald Trump posted Sunday on social media as he marked his 80th birthday.

"I hereby fully authorise the toll-free opening of the Strait of Hormuz, and, simultaneously herewith, authorise the immediate removal of the United States Naval blockade.