The top diplomats from Iran, the U.S. and other world powers planned to sign off on a nuclear accord Tuesday and announce the deal, officials from both sides said, after struggling to resolve a late standoff over when and how to lift a United Nations arms embargo.

Negotiators set a meeting that includes U.S. Secretary of State John Kerry, Iranian Foreign Minister Javad Zarif and his counterparts from China, Russia, France, Britain and Germany, which they said was intended to complete the deal. But it couldn’t be assured until all the parties actually sign.

The move followed days of often tense and acrimonious talks intended to sew up nearly two years of bargaining between Iran and the six world powers, during which officials often signaled a deal was close, only to backtrack and return to the table. The agreement seeks to block Iran’s path to a nuclear weapon in exchange for removing economic sanctions on Tehran.

The deal is a long-sought foreign policy goal of the Obama administration but will put the White House on course for months of political strife with dissenters in Congress and in allied Middle Eastern nations.

The accord has one main text and five detailed annexes and totals about 100 pages. U.S. and Iranian officials said there are agreements to cap Iran’s stockpile of nuclear fuel, significantly reduce the number of centrifuge machines Tehran uses to enrich uranium, and to reduce the amount of plutonium produced by an Iranian reactor.