It took a long, hard 18-month struggle, but Iran and the Western powers finally inked an agreement limiting nuclear development in the key Middle Eastern nation on Tuesday morning. International leaders and diplomats hailed the landmark Iran nuclear deal to limit and monitor the country’s nuclear program as a key breakthrough that would see Iran return to the global mainstream and avert the threat of a nuclear-armed Iran or another U.S. military intervention in the Middle East.

Iran nuclear deal reached: 'No deal means a greater chance of more war in the Middle East' - Obama

Now the U.S. Congress has 60 days to discuss and approve or reject the deal.

Details on the historic Iran nuclear deal

The new Iran nuclear deal is designed to prevent Iran from producing sufficient fissile material for an atomic weapon for at least a decade. It also calls for unfettered inspections of Iranian nuclear facilities, including a number of military sites.

Political analysts say the agreement is a welcome breath of fresh air after decades of animosity between the U.S. and Iran.

President Barack Obama hailed the deal, noting that it “is not built on trust, it is built on verification,” in a statement carried live in the U.S. and on Iranian state TV. Obama also said that all potential pathways to an Iranian nuclear weapon have now been shut off.

The Iran nuclear deal negotiations were among the lengthiest ever, stretching all the way back to 1997. The negotiations were off and on again a number of times, with frequent multi-month breaks. In the meantime, Iran’s nuclear program continued to grow, and Western intelligence agencies say the country was likely just a few months away from developing a nuclear weapon. Of note, both the U.S. and Israel had threatened military responses if Iran was deemed to be assembling a nuclear device.

The U.S, joined the negotiations seven years ago, and U.S. and Iranian diplomats held a secret meeting in Oman in 2012 to assess each other’s positions. However, the process was basically stalemated until mid-2013, with the election of moderate Hassan Rouhani as president. Rouhani said shortly after he came to power that he was ready for serious compromise with the West.

The nonpublic U.S.-Iranian talks continued, eventually leading to a face-to-face meeting between Secretary of State John Kerry and Iranian Foreign Minister Mohammad Javad Zarif at the UN in the fall of 2013. That conversation led to a phone call between Iranian President Rouhani and President Barack Obama. The brief chat between the two leaders was the highest level diplomatic exchange between the nations since Iran’s 1979 Islamic Revolution.

With their presidents’ approval, the two chief diplomats moved ahead with the talks. After a couple of months of negotiations, Iran and the six Western powers announced a preliminary agreement that put temporary curbs on Tehran’s nuclear program and freed up a few Iranian assets. It took another year and change, including two missed deadlines, before the two sides could hammer out an initial agreement in April of this year. They agree to meet in late June for the final push to a deal.

The negotiations for the final agreement, however, proved tortuous, stretching two weeks beyond self-imposed deadlines. A breakthrough occurred on Monday, as  the key remaining differences regarding inspections of Iranian facilities and the ongoing arms embargo against Iran were resolved in a meeting that included Kerry, EU rep Mogherini and Russian Foreign Minister Sergey Lavrov, who were eventually joined the Iranian FM. Less than an hour after after Zarif joined the meeting, the ministers adjourned and announced they had reached a deal..

Statement from Iranian Foreign minister

Iranian FM Mohammad Javad Zarif commented: “We are reaching an agreement that is not perfect for anybody, but it is what we could accomplish, and it is an important achievement for all of us.”

Statement from President Obama

“As the American people and Congress review the deal, it will be important to consider the alternative,” Obama said in his comments on the Iran nuclear deal. Without a binding agreement, Obama argued, Iran would have “no lasting constraints” on its nuclear program, significantly increasing the possibility of American military action.

“Our national security interest now depends upon preventing Iran from obtaining a nuclear weapon, which means that without a diplomatic resolution, either I or a future U.S. president would face a decision about whether or not to allow Iran to obtain a nuclear weapon or whether to use our military to stop it,” Obama said. “Put simply, no deal means a greater chance of more war in the Middle East.”