After more than two weeks of torturous talks in Vienna, an historic deal between Iran and six major powers over the country's nuclear programme seems to be finally coming to fruition.
The highly anticipated agreement will bring an end to a dispute between Iran and the West that has lasted more than 12 years.
Here is an outline of the saga:
1. While Iran and the United States had been cooperating on civil nuclear capabilities since as far back as 1957, Iran's nuclear programme went dormant before the start of its war with Iraq in the 1980s.
2. The current dispute started in 2002 when The International Atomic Energy Agency (IAEA) confirmed that Iran had undeclared nuclear facilities procured by an illicit nuclear network.
3. Iran says its nuclear programme is peaceful, but Western intelligence agencies suspect the country is seeking to make nuclear weapons.
4. Iran agreed in 2003 to suspend uranium-enrichment activities during talks with Britain, France and Germany. But after Mr Mahmoud Ahmadinejad was elected president in 2005, the activities resumed, and the IAEA took the case to the United Nations Security Council. The UN imposed economic sanctions on Iran in 2006.
5. The US, which in 2006 together with Russia and China joined Britain, France and Germany to engage in talks with Iran, in a 2012 law gained the power to sanction foreign banks if they fail to cut Iranian oil imports. The move caused Iran's economy to nosedive, due to a plunge in oil sales.
6. Though the talks stalled between 2009 and 2012, they resumed secretly between the US and Iran in 2012, and gained momentum after Mr Hassan Rouhani was elected Iran president, pledging to ease the UN sanctions to revive the economy.
7. The result was an interim deal signed in 2013, called the Joint Plan of Action, between Iran and the six powers, where Iran would get some sanctions relief.
8. Iran's regional rivals Israel and Saudi Arabia oppose a deal, and are sceptical of the talks. They do not want any concessions to be given to Iran as they fear it will give the country more resources and more assertiveness, leading to its greater participation in regional conflicts.
9. The parties aimed to eke out a comprehensive deal following the announcement of a political framework on April 2 this year, but the deadline for that has been pushed back three times in the last 10 days. The most recent deadline is Monday.
10. Negotiators have been bogged down over decisions on what limits to set on Iran's nuclear research and the pace of sanctions relief, among others. Iran wants sanctions to be lifted immediately, while others want a gradual lifting, in case Iran violates the terms of the deal.
Diplomats have spoken of a shouting match between Iran's Foreign Minister Mohammad Javad Zarif and US Secretary of State John Kerry.
Sources: Reuters, The New York Times, euronews.com