GENEVA — The United States and five other world powers announced a landmark accord Sunday morning that would temporarily freeze Iran’s nuclear program and lay the foundation for a more sweeping agreement.

It was the first time in nearly a decade, American officials said, that an international agreement had been reached to halt much of Iran’s nuclear program and roll some elements of it back.

The aim of the accord, which is to last six months, is to give international negotiators time to pursue a more comprehensive pact that would ratchet back much of Iran’s nuclear program and ensure that it could be used only for peaceful purposes.

Shortly after the agreement was signed at 3 a.m. in the Palace of Nations in Geneva, President Obama, speaking from the State Dining Room in the White House, hailed it as the most “significant and tangible” progress of a diplomatic campaign that began when he took office.