ISLAMABAD (AP) — The United States and Iran have reached an agreement to end the war and open the Strait of Hormuz, offering relief to the global economy more than three months since fighting began.

Details of the deal were not immediately available. Key mediator Pakistan said the signing will be Friday in Switzerland. Key issues like Iran's nuclear program are expected to be addressed later.

U.S. President Donald Trump confirmed a deal had been reached and said he had authorized an end to the U.S. naval blockade of Iranian ports in the Strait of Hormuz, imposed in retaliation for Iran's grip on the crucial waterway.

"Congratulations to all!" Trump wrote on social media, adding: "I hereby fully authorize the toll free opening of the Strait of Hormuz, and, simultaneously herewith, authorize the immediate removal of the United States Naval blockade."

The U.S. previously said it would ease its blockade of Iranian ports as the strait reopens, and would agree to relax sanctions to allow Iran to sell more of its oil and strengthen its battered economy.