Fresh demands from Russia threatened to derail talks to restore the 2015 Iran nuclear deal, as Moscow said it wanted written guarantees that Ukraine-related sanctions won’t prevent it from trading broadly with Tehran under a revived pact.

The demands, made by Russian Foreign Minister Sergei Lavrov on Saturday and dismissed by U.S. officials on Sunday, came as Western and Iranian officials said they were near to reaching a deal to restore the nuclear pact, which lifted most international sanctions on Iran in exchange for tight but temporary restrictions on Tehran’s nuclear programs.

The U.S. left the agreement in May 2018, and Iran has since mid-2019 massively expanded its nuclear work. The Vienna talks focus on the exact steps that Tehran and Washington would need to take to return into compliance with the deal.

Western officials said they wanted a deal on the nuclear file in place this week. Chief negotiators from European powers left Vienna to return to their capitals Friday as they waited for Iran and the U.S. to try to solve the final differences between them. These included precisely which sanctions Washington would lift and the exact sequence of steps the U.S. and Iran would take to return into compliance with the 2015 deal. Advances in Iran’s nuclear work mean Western officials have warned that it could very soon be impossible to restore the 2015 nuclear deal because it would no longer be possible to re-create the central benefit for the U.S. and Europe of that agreement—keeping Iran months away from being able to amass enough nuclear fuel for one nuclear weapon.

A confidential report from the United Nations atomic agency circulated Thursday showed that Iran had now produced 33.2 kilograms of highly enriched uranium, around three-quarters of what it would need to have enough weapon-grade 90% fuel for a nuclear weapon. Experts say it would take Iran just a few weeks to amass enough weapons grade nuclear fuel.

It was always understood by Western officials that Russia’s specific role within the 2015 nuclear deal would need to be protected from sanctions. That includes receiving enriched uranium from Iran and exchanging it for yellowcake, Russia’s work to turn Iran’s Fordow nuclear facility into a research center and other nuclear-specific deliveries to Tehran’s facilities.

However, Mr. Lavrov appeared to demand far more sweeping guarantees that could introduce major loopholes in the tight financial, economic and energy sanctions the West has imposed in recent days because of Russia’s invasion of Ukraine.

“We have asked for a written guarantee…that the current process triggered by the United States does not in any way damage our right to free and full trade, economic and investment cooperation and military-technical cooperation with the Islamic State,” Mr. Lavrov said.

Soon after Mr. Lavrov’s comments, Russia’s chief negotiator at the nuclear talks, Mikhail Ulyanov, tweeted that he had raised questions that needed tackling with a senior European official “to ensure smooth civil nuclear cooperation with Iran.” That suggested Russia’s real demands at the talks were narrower than Mr. Lavrov had suggested.

Mr. Blinken told CBS that the western sanctions on Russia “have nothing to do with…the Iranian nuclear deal.”

“These things are totally different and are just are not in any way linked together, so I think that’s- that’s irrelevant,” he said Sunday.

The Iranian delegation in Vienna said this weekend they were awaiting clarification from Moscow.

A Western diplomat said that if the guarantees are purely about the work Russia would do in Iran under a restored nuclear deal, “that can be managed.”

“But if Lavrov is using this as a play to try to carve a huge hole out of the overall Ukraine sanctions, that’s a different story,” the person said.

An Iranian official said his delegation was awaiting clarification from Moscow.

Either way, the Russian demands now look set to kick talks into next week, two Western diplomats said.

“In my view, a deal is still more likely than not. Critically, both Washington and Tehran want to get this done,” said Henry Rome, a director covering global macro politics and Iran at Eurasia Group. “Russia throwing sand in the gears may actually bring these two adversaries together to reach creative solutions to get the deal signed.”

Since talks began last April, Iran has refused to negotiate directly with the U.S. Instead, the other parties to the agreement—Britain, France, Germany, Russia and China and the European Union—have served as intermediaries.

Russia had played a generally constructive role in the talks, Western diplomats have said, at times pulling Iran back from unreasonable demands and pressing Tehran—publicly at times—not to drag the talks out too long.

However, senior Western officials said that over the last few days, with the Ukraine conflict in the background, Russian officials at the talks had been more hesitant, telling their counterparts they needed to check new ideas with Moscow.

While the talks in Vienna appeared to stall again, one potential hurdle to reviving the nuclear deal might have been removed Saturday following a trip to Tehran by Rafael Grossi, the director general of the International Atomic Energy Agency.

Mr. Grossi went to Tehran to seek an agreement about the handling of a probe the agency has been doing for three years now into undeclared nuclear material found in Iran. Tehran has been stalling on the investigation and had pushed in Vienna for the files to be closed as part of restoring the nuclear deal, something the agency and Western officials refused.

A joint statement said that the IAEA would aim to present a conclusion on the probe to its Board in June if Iran cooperated. However Mr. Grossi said Saturday evening when he returned to Vienna that a report could leave questions open which the agency would need to keep pursuing.

You may come to the conclusion that what you have is not enough and more is needed,” he told reporters.