The Taliban regime in Afghanistan has said it could "support" Iran if it is attacked by the US, amid the threat of a military onslaught on the country.
Zabihullah Mujahid, a spokesperson for the group, told Radio Iran's Pashto-language service that if the US bombed Iran, then it could help Tehran, according to local media, although this would likely be moral and humanitarian support rather than military assistance, according to Iranian opposition media.
Although the Taliban seized power in Afghanistan in 2021, only Russia formally acknowledges it as a government. Some countries, such as the UAE and Pakistan, have been involved in diplomatic engagement
Mujahid said that while the Taliban does not want a confrontation with the US, it would be obliged to assist its neighbour if it comes under attack.
He said that the Taliban hopes indirect talks between Iran and the US work out, though Kabul would show sympathy and possibly cooperate with Tehran in the event of a war.
The spokesperson also claimed that Iran "won" a brief war with the US and Israel in June, in which Tehran managed to target Israeli and American military sites in the region, despite sustaining significant losses.
Mujahid said that if fighting between the two sides broke out again, then Iran "has the capability, is in the right, and has the right to defend itself" and would emerge victorious.
Iran is trying to avoid war by engaging in indirect negotiations with the US this week on its nuclear programme, but has ruled out some demands, such as zero enrichment.
The US has built up its military forces in the region, allegedly to strike Iran if nuclear talks fail, with a second aircraft carrier sent to the Gulf.
Iran has also flexed its military muscles by conducting war games in the Strait of Hormuz on Monday, a choke point for oil leaving the Gulf, with the Revolutionary Guard warning this was to prepare for "potential security and military threats", in a likely reference to the US armada in the region.
The Taliban and Iran have had fraught relations over the years, with the former governing according to Sunni fundamentalist interpretations of Islam and the latter to Twelver Shia doctrine.
Relations between the two were at their weakest after Taliban fighters killed ten diplomats and one journalist at the Iranian consulate in Mazar-i-Sharif, northern Afghanistan, in 1998.
Iran and Afghan border guards have also engaged in border clashes since the Taliban took power again, but relations between the two sides have improved over the years.