The United States and Iran agreed to hold talks in Oman on Friday, officials said, despite sharp differences over Washington’s demand to include Iran’s missile program and Tehran’s insistence that negotiations focus solely on its nuclear activities.

The delicate diplomatic effort comes ​amid heightened tensions as the U.S. builds up forces in the Middle East and regional ‍players seek to avoid a military confrontation that many fear could escalate into a wider war.

Differences in recent days over the scope and venue for the talks have raised doubts whether the meeting would take place, leaving open the possibility that U.S. President Donald Trump could carry out his threat to strike Iran.

Asked Wednesday whether Iran's Supreme Leader Ayatollah Ali Khamenei should be worried, Trump told NBC News: "I would say he should be very worried. ‍Yeah, he should be." He added that "they're negotiating with us," but did not elaborate.

After Trump spoke, U.S. and Iranian officials said the two sides had agreed to shift the talks' location to Muscat after initially accepting Istanbul.