The news that the obscurely named Joint Comprehensive Plan of Action (JCPOA) is back in force may reach you even before this article does, but the release of Nazanin Zaghari-Ratcliffe on Wednesday was a clear signal that the Iran nuclear accord is back in effect.

Ms Zaghari-Ratcliffe, an Iranian-born British citizen, was arrested in Tehran in 2016 while visiting her mother and jailed as a spy. She was actually being taken hostage in an attempt to make the United Kingdom to pay the Islamic Republic a very large, very old debt.

Zaghari-Ratcliffe’s situation got much worse when Boris Johnson, then the UK’s foreign secretary, wrongly stated that she had been in Iran to “train journalists”. (He is famous for not reading his briefs.) A year later her 5-year-old daughter Gabriella was sent back to London to live with her husband, as Nazanin was serving a five-year prison sentence.

Then suddenly, on Wednesday, she was on her way home, and another British hostage of Iranian descent was on the same plane. The news leaked out that Britain had finally paid its $540 million debt after 45 years of stalling. (The Shah had ordered British tanks before he was overthrown. Britain cancelled the order, but kept the money.) So the JCPOA is back on.

In the 2015 deal, Iran agreed to do no work that would get it closer to building nuclear weapons for fifteen years in return for the lifting of international trade sanctions. It was Barack Obama’s great foreign policy success – which may be why Donald Trump, seeking to erase every achievement of America’s first black president, cancelled the deal in 2018.

Israel’s former prime minister Benyamin Netanyahu claims credit for talking Trump into that act of vandalism, which may or may not be true, but in any case it didn’t actually kill the deal.

The other signatories of the JCPOA – China, France, Germany, Russia and the UK – promised to try to bring the Americans back, but effectively most obeyed the trade sanctions that Trump had unilaterally slapped on Iran. Iran waited for a year, and then started ratcheting up its nuclear research every three months, getting closer and closer to a weapons capability.

The JCPOA treaty said that Iran would not enrich uranium higher than 3.67%. By last month it was up to 60%. Trump and Netanyahu were both gone, and both Israeli and US senior military officers had concluded the old deal was better than nothing.

President Joe Biden was of the same mind, and he was also worried about a looming confrontation with Russia over Ukraine, so last autumn he instructed his diplomatic people to stop trying to screw extra concessions out the Iranians. Just get on with it!

Still with me here? There will be a test.

Things moved quickly after that, and by late last month Josep Borrell, the European Union’s foreign affairs chief, was saying that “a final text is essentially ready and on the table.” However, he added, “a pause in the Vienna talks is needed due to external factors.”

The external factors were the Russian invasion of Ukraine and the Western sanctions on Russia that followed. Russian foreign minister Sergei Lavrov demanded that Washington pledge not to impose sanctions on any bilateral trade deal between Russia and Iran after the JCPOA comes back into effect.

Lavrov didn’t really believe that he could get that promise out of the United States. He just wanted to block the resurrection of the JCPOA, at least for the moment, because it would let Iran start reselling its oil on the international market.

At the moment Iran exports less than a million barrels per day of crude oil, almost all of it to China. It could sell at least another million and a half bpd internationally if sanctions are finally lifted, and that extra supply would certainly drop the oil price sharply.

Oil and gas sales are about the last remaining major source of foreign currency for Russia. The benchmark Brent oil price today is $95 a barrel, already down by more than $40 from last month’s panic-stricken peak.

The extra Iranian oil could knock it down another $20 or $30 bpd, cutting Russia’s income further and letting Europe buy more of its oil from Iran, not Russia. But it appears that Lavrov didn’t manage to extract any guarantees, and that the JCPOA is really coming back. Good.

There are so many moving parts to this deal that it could still fall apart at the last second, of course. But for now it looks good, and Nazanin Zaghari-Ratcliffe is already home with her family.