Senior US and Iranian officials are set to continue discussions after talks in Oman, the Iranian foreign minister says, amid a crisis that had raised fears of a conflict between the countries.

Abbas Araghchi said the mediated discussions were a good beginning and exclusively nuclear, and the negotiators would now return to their capitals for consultations.

Ahead of the talks, US officials said they also wanted to discuss Iran's ballistic missiles and its support for regional armed groups, which underscored the gaps between the countries' positions.

There has been no immediate US reaction.

The talks came against the backdrop of a US military build up in the Middle East in response to Iran's violent repression of nationwide anti-government protests last month, which human rights groups say killed many thousands of people.

In recent weeks, President Donald Trump has threatened to bomb Iran if it does not reach a deal. The US has sent thousands of troops and what Trump has described as an armada to the region, including an aircraft carrier along with other warships as well as fighter jets.

Iran, meanwhile, has vowed to respond to an attack with force, threatening to strike American military assets in the Middle East and Israel.

Speaking to Iranian state television, Araghchi said there was an atmosphere of mistrust between the two sides that must be overcome, and details about the possible next round of talks would be decided later.

Oman's Foreign Minister Badr Albusaidi, who mediated the discussions, said they had been useful to clarify both Iranian and American thinking and identify areas for possible progress.

Araghchi led the Iranian delegation, while the US was represented by special envoy Steve Witkoff and Trump's son-in-law, Jared Kushner.

These were the first talks involving US and Iranian officials since before the war between Israel and Iran last June, when the US bombed Iran's three main nuclear facilities. Despite the prospect of further meetings, it remains unclear whether a deal is possible as major differences remain.

For Iran's embattled leaders, this could mean a chance to avert US military action that could further destabilise the regime, which analysts say is in its weakest position since it came to power following the 1979 Islamic Revolution.

The current stand-off has brought the issue of Iran's nuclear programme back to discussions, having been at the centre of a long-running dispute with the West. For decades, Iran has said its programme is for peaceful purposes, while the US and Israel have accused it of being part of an effort to develop a weapon.

Iranian officials have indicated being open to concessions, which could include the creation of a regional consortium for uranium enrichment, as well as discussions about transferring its stockpile of highly enriched uranium to a third country.

At the same time, Iran says demands to limit its ballistic missile programme and to end support for proxies in the region are unacceptable and a breach of its sovereignty.

In any case, Iran is expected to demand the lifting of sanctions that have crippled its economy, which opponents of the regime say would provide a lifeline to the clerical rulers.

For the US, the negotiations could offer an off-ramp from military threats. Countries in the region are concerned that a US strike could lead to a wider conflict or long-term chaos in Iran.

Trump's threats came as Iran's security forces brutally suppressed large-scale demonstrations triggered by an economic crisis, with thousands reported dead and many arrested.

As this situation unfolds, significant international attention remains focused on the possibility of a resolution between Iran and the United States.