The US and Iran have agreed to hold nuclear talks in Oman on Friday, as President Donald Trump issued a blunt warning to Supreme Leader Ayatollah Ali Khamenei.

Iranian Foreign Minister Abbas Araghchi said that the meeting would start at 10:00 (06:00 GMT) in Muscat. US officials also confirmed it would happen there.

The talks had appeared to be in jeopardy, with the two countries at odds over location and parameters. Trump has built up US forces in the region and threatened military action if Iran does not agree to a deal regarding its nuclear programme and stop violence against protesters. I would say he should be very worried, Trump said in an NBC interview.

Khamenei has warned that any attack from the US would lead to a regional war.

Back channel negotiations were reportedly encouraged by several Arab and Muslim leaders, leading to a reassessment by the Trump administration to continue efforts at dialogue. US Secretary of State Marco Rubio indicated that the discussions would need to address a broader range of issues beyond just Iran's nuclear ambitions.

Amid these developments, Araghchi has indicated that Iran is open to discussions on curbing its nuclear activities as a means to foster relations, while maintaining that their nuclear ambitions are peaceful.

However, Trump’s earlier military actions, including airstrikes against Iranian nuclear facilities, have set a context of suspicion and urgency surrounding the impending talks.

The talks come on the heels of significant unrest within Iran, which has seen a violent crackdown on protests spurred by economic hardship, leading to thousands of deaths according to various reports.