PARIS/BRUSSELS  - Iran and the United States said on Friday they would hold indirect talks in Vienna from Tuesday as part of broader negotiations to revive the 2015 nuclear deal between Tehran and global powers.

Tehran has ruled out face-to-face bilateral discussions, but the presence of both Iran and the United States in the Austrian capital - welcomed by Washington as a "healthy step forward" - will help to focus efforts to bring all sides back into compliance with the accord.

The aim is to reach an agreement within two months, said a senior official with the European Union, the coordinator of the deal. Iran holds elections in June.

Former U.S. President Donald Trump pulled out of the nuclear pact in 2018 and reimposed sanctions on Iran, prompting it to violate some of the accord's nuclear restrictions. His successor Joe Biden wants to revive the agreement but Washington and Tehran have been at odds over who should take the first step.

"Iran and the U.S. will be in the same town, but not the same room," a European diplomatic source said.

A Western diplomat said a shuttle diplomacy approach would be adopted.

U.S. State Department spokesman Ned Price said the talks would be structured around working groups that the EU is going to form with remaining participants, including Iran.

"We don't anticipate an immediate breakthrough as there will be difficult discussions ahead. But we believe this is a healthy step forward," he said in a statement, adding that Washington remained open to direct talks with Tehran.

White House spokeswoman Jen Psaki said the United States saw the indirect talks as potentially constructive but was clear-eyed about the diplomacy. She said the United States did not currently expect direct talks to take place, but remained open to them.  

State Department spokeswoman Jalina Porter reiterated past calls for Iran to release all detained U.S. citizens, saying their safe return was a "top priority" for the United States.

The EU official said negotiating lists of sanctions that the United States could lift and nuclear obligations that Iran should meet, the EU official said "should marry at some point".

"In the end, we are approaching this in a parallel way. I do think we can do it in less than two months," the official said.

Iran, China, Russia, France, Germany and Britain - all parties to the 2015 deal - held virtual talks on Friday to see how to progress.

"Aim: Rapidly finalize sanction-lifting & nuclear measures for choreographed removal of all sanctions, followed by Iran ceasing remedial measures," Iran's Foreign Minister Mohammad Javad Zarif said on Twitter. "No Iran-US meeting. Unnecessary."

Two diplomats said the first round of talks could last several days, followed by two or three subsequent rounds in the following weeks to tackle tricky issues.

Under the 2015 accord, U.S. and other economic sanctions on Tehran were removed in return for curbs on Iran's nuclear programme to make it harder to develop a nuclear weapon - an ambition Tehran denies.

Diplomats said last month that the odds of Washington and Tehran making progress to revive the deal before Iran's election had dwindled after Iran toughened its stance.  

"If we don’t get there in two months will be definitely bad news," the EU official said.

(Additional reporting by Francois Murphy in Vienna and Patricia Zengerle, David Brunnstrom and Doina Chiacu in Washington; Editing by John Stonestreet and Alistair Bell) ((;))