Even though Iran has refrained from formally recognising the Taliban-led government in Kabul, it has allowed Taliban representatives to manage the Afghan embassy in Tehran.
Since then, however, not only have Tehran and the Taliban traded accusations of rights violations, but many in Iran are increasingly viewing Afghans in the country as a security threat.
Last month, the holy Shia shrine of Shah Cheragh, located in the southern Fars province, came under attack for the second time in less than a year, with four people killed.
One year earlier, a similar attack on the shrine killed 15 people, with the Islamic State (IS) claiming responsibility and two Afghan men subsequently executed by hanging for their involvement.
In the August attack, one of the militants involved, Rahmatullah Norozov, reportedly received training from IS in Tajikistan, according to the Tasnim news agency, although no group has claimed responsibility.
Nonetheless, the shrine attacks have created hostility towards the hundreds of thousands of Afghan refugees in Iran.
According to the UN, there are 780,000 registered Afghan refugees in the country, with an estimated two million more thought to be undocumented.
“The situation with regards to Iranians seeing Afghan refugees as a security threat could develop very similarly as it has in Pakistan,” Zeeshan Shah, a financial analyst at FINRA in Washington, told The New Arab.
“For example, whenever there is a terrorist attack in Pakistan, now Afghan refugees are routinely suspected and rounded up by security agencies,” he added.
“A similar situation could occur in Iran with the recent increase in terrorist attacks carried out by Afghan/Tajik operatives from Daesh-K if more attacks were to occur.”
Notwithstanding visits by senior Afghan Taliban officials to Iran, the security situation on the 900-kilometre-long Afghan-Iran border has remained perpetually tense, with frequent clashes.
Amid rising public demand for government action, Nouri Qazaljeh, an Iranian parliamentarian, recently called the Afghan refugee influx a security and economic threat, while Jomhuri Eslami, an Iranian newspaper, termed Tehran’s links with the Afghan Taliban government a black “stain” on Iran-Afghanistan ties.
Banned from entering popular provinces such as Kermanshah, Afghan refugees are also prevented from entering the Bam Land shopping complex near Chitgar Lake in Iran’s northwest region. Planning to house refugees in three provinces, Tehran now offers them only temporary shelter.
Concerned over the mistreatment of Afghan refugees in Iran, the Taliban administration spoke out earlier this year. Abdul Mutalib Haqqani, spokesman for the Ministry of Refugees and Repatriation, said in January that “there is no doubt that Afghans have faced a number of problems in neighbouring Iran”.
Afghans have been going to Iran for work since the late 1970s as the country had a better relative economic situation. Waves of refugees followed the Soviet Invasion in 1979 and the first period of Taliban rule in the early 1990s.
“Over the years, Afghans have worked very hard in Iranian construction and agriculture sectors and Iran has at times throttled their children’s inclusion into its education system,” Torek Farhadi, an independent senior Afghan analyst based in Geneva, told The New Arab.
Since 2021, the number of Afghans crossing into Iran has spiked due to instability after the Taliban takeover, and some were forcibly expelled back to Afghanistan.
“We must admit that Afghan migrants create various kinds of tension in the Iranian work force as they are accepting lower wages,” Farhadi added.
“At times, Iranians do make soft threats to send back Afghan migrants home but the reality is that after 4.5 decades Afghans are part of the Iranian economic fabric and sending them all back is not easy. The Iranian security establishment is also afraid of Daesh and other drug lords disguised as refugees from Nimroz, Afghanistan, into Iran.”
In tandem, tensions over water supplies from Afghanistan’s Helmand River - known as the Hirmand River on the Iranian side - to Iran’s Sistan - Baluchistan province have escalated this year.
Tehran complains that the Taliban government in Kabul has violated the 1973 Helmand River Treaty by restricting the flow of water to Iran’s eastern regions and caused severe shortages in the southeastern province by building dams illegally.
Matters took a serious turn in May, when President Raisi announced that he would not allow the rights of the Iranian people to be violated during a visit to the drought-ridden region. Just days later, serious clashes broke out on the border with Afghanistan’s Nimroz province, and two Iranian border guards and one Taliban fighter were killed.
Soon after the incident, Taliban interior ministry spokesman Abdul Nafy Takor said that, "The situation (is) currently under control," and that his government did not “want war with its neighbour.” But that did not end the controversy.
“Surprisingly, relations between the Taliban-led Afghan government and Iran have been relatively stable since the Taliban returned to power two years ago,” Zeeshan Shah, a financial analyst at FINRA in Washington, told TNA.
While tensions over the Helmand River have existed between the two countries since the late 1870s, pre-dating both the Taliban and the Islamic Republic, and the Taliban has taken a tougher line leading to border clashes, the situation has not yet spiralled out of control.
“There has been regular diplomatic contact between the two countries and no new tensions as compared to Afghanistan’s relations with Uzbekistan, Tajikistan, and Pakistan which have been increasingly tense over issues such as water sharing and providing sanctuary for terrorist groups,” Shah added.
Climate change is exacerbating the situation and the water security of Iran’s Helmand region is badly affected. Consisting of arid and semi-arid land, Iran is threatened by desertification and alleges that it only receives 4% of the agreed amount of water.
"The Helmand is a river of great importance for Iran because it allows the agricultural areas of Sistan and Baluchestan to develop” Jonathan Piron, a historian specialising in Iran at the Etopia research centre in Brussels, told France 24.
“And this becomes all the more important as we are in a situation where accelerating sequences of drought and reduced rainfall are putting these agricultural regions at risk”.
Also threatened by food insecurity and water shortages, the Taliban began building more dams, exacerbating tensions with Iran. The areas where temperatures are highest in Afghanistan are where conflict has occurred.
“Iran is hosting a lot of Amayesh/ Hoviat card holders as well as regular refugees, and there have been a lot of issues after the Taliban takeover,” Naveed Ali Sheikh, a military relations researcher and analyst based in Islamabad, told The New Arab.
“Also, the Taliban government is building more dams. As per the Helmand River Agreement, Iran must receive 20 million cubic meters of water every year and any attempts to sabotage or reduce the quantity by building diversions violates the treaty, so Iran is actively preparing to counter these threats both internally and externally.”
After a visit by their foreign minister, Amir Khan Muttaqi to Tehran in January, the Taliban increased the water supply from the Kamal Khan dam in Afghanistan to Lake Hamoun in Iran.
But this did not last long, as Afghanistan is also experiencing higher temperatures and it cannot afford to be generous with water just to acquire diplomatic leverage.
In the long run, Piron said that, "There is a desire on the part of the Taliban to regain control of Helmand and to promote water redistribution for their own population in order to assert their legitimacy as rulers”.
As Afghanistan is the upper riparian in this water dispute, there can be no sustainable solution without a bilateral agreement, but fruitful negotiations with the Afghan Taliban regime in Kabul may prove to be an uphill task.
Sabena Siddiqui is a foreign affairs journalist, lawyer and geopolitical analyst specialising in modern China, the Belt and Road Initiative, Middle East and South Asia.
Follow her on Twitter: @sabena_siddiqi