U.S. Secretary of State John F. Kerry holds a guitar, given as a present by Spanish Foreign Minister Jose Manuel Garcia-Margallo, during a meeting Sunday at the Foreign Ministry in Madrid. REUTERS/Ballesteros/ (Reuters)

The Iran nuclear deal moved closer to reality Sunday as the United States and the European Union laid the legal groundwork for the eventual lifting of sanctions against the Islamic republic.

President Obama signed an order directing government agencies to prepare to issue waivers on sanctions related to Iran’s nuclear program. The European Union announced legal actions that clear the way for the release of an estimated $100 billion in frozen Iranian assets.

Those measures will not take effect for months, and then only if Tehran satisfactorily meets the conditions spelled out in a landmark nuclear agreement between Iran and six world powers, including the United States.

The legal steps were required under the deal signed in Vienna in July. Sunday was designated as the agreement’s “Adoption Day,” 90 days after it was endorsed by the U.N. Security Council.

“This is an important day for all of us and a critical first step in the process of ensuring that Iran’s nuclear program will be exclusively for peaceful purposes,” said Secretary of State John F. Kerry in a statement from Madrid, where he is meeting with Spanish officials.

It is now up to Iran to start dismantling significant parts of its nuclear infrastructure. It must remove and place into storage thousands of centrifuges, slash its uranium stockpiles and pour concrete into the reactor core of its plutonium processing plant at Arak. It also must account for the possible military dimensions of its past nuclear activity, thought to have been abandoned a decade ago. Iran, however, has always denied pursuing nuclear weapons and said its nuclear program is purely for peaceful purposes.

On Monday, State Department officials will be in Vienna for the first meeting of a joint commission made up of the countries that signed the nuclear deal and established to work out issues that arise as the deal is implemented. Stephen D. Mull, a former U.S. ambassador to Poland, and Thomas A. Shannon Jr., a State Department counselor, will represent the United States. The joint commission is expected to release plans for how China will help Iran modify the heavy-water reactor at Arak.

Sanctions can be lifted only when all the agreed-upon steps are verified by the International Atomic Energy Agency — which will be called “Implementation Day.”

Iran is impatient to jump-start its faltering economy before parliamentary elections in late February, and President Hassan Rouhani has said the complicated work needed to lift sanctions is expected to be completed in just six to eight weeks. The United States, skeptical it can be done that quickly, estimates the work could take six months or longer.

The E.U.’s adoption of the legislative framework for lifting sanctions was announced in a joint statement by the its foreign policy chief, Federica Mogherini, and Iranian Foreign Minister Mohammad Javad Zarif.

“It will take effect on Implementation Day, simultaneously with the IAEA-verified implementation of agreed nuclear measures by Iran,” the statement said.

In the three months since the deal was endorsed by the United Nations, Iran has tested a long-range ballistic missile thought to be in violation of U.N. sanctions unrelated to nuclear issues. It has convicted a U.S. citizen, The Washington Post’s Tehran correspondent, Jason Rezaian, following a closed-door trial on espionage charges that it has still not officially explained. And it intervened militarily in Syria against positions of the militant Islamic State group.

Iran’s actions have hardened criticism of the deal. U.S. Rep. Edward R. Royce (R-Calif.), chairman of the House Foreign Affairs Committee, issued a statement calling the Obama administration “more naive by the day.”

“It’s sure tough to look at Iran’s actions over the last three months — let alone 35 years — and think Tehran will live up to its end of the nuclear bargain,” he said. “If this is what the last 90 days look like, the next few years look like a disaster.”

Kerry said the agreement represents a “measurable step away” from nuclear proliferation.

“If fully implemented, it will bring unprecedented insight and accountability to Iran’s nuclear program forever,” Kerry said. “As we move from Adoption Day now towards Implementation Day, I and my entire team will remain vigilant and mindful of not just how far we have come, but how much further we have to go in seeing that this deal is fully implemented.”