Iran's military has said its troops have secured the nation's border with Afghanistan, but the unrest in the neighboring country has evoked painful memories for Iranian diplomats who once again fear for their safety more than two decades after a deadly encounter in Taliban-controlled territory.
Speaking Friday on the sidelines of a vaccination center in the city of Mashhad as the Taliban continued their rapid gains across Afghanistan, Islamic Revolutionary Guard Corps commander Major General Hossein Salami said that "the police, the army and the corps are overlooking the borders and have the necessary control and there is no concern in this regard."
But while the security situation on the boundary between the two Islamic Republics appeared stable, the Iranian Foreign Ministry issued an appeal for the lives of citizens and foreign diplomats, including those from Iran, in the country, especially the recently Taliban-taken city of Herat, near the Afghan borders with Iran and Turkmenistan.
Spokesperson Saeed Khatibzadeh issued a statement Friday regarding "the need to protect the lives of people and civilians amid the chaotic situation in Afghanistan," and Tehran's "serious concern in ensuring the complete safety and health of diplomats and diplomatic facilities" in Herat, where Iran has a consulate.
He said the ministry remained "in constant contact" with the consulate in the city, the third-largest in Afghanistan, "to make sure about the safety of the Iranian diplomats in that mission."
The news comes a day after the state-run Islamic Republic News Agency announced the closure of the Iranian consulate in the northern city of Mazar-i-Sharif, where, in August 1998, 10 Iranian diplomats and an Iranian journalist were killed when the mission came under siege during the last Taliban takeover of the country in an event that lives on Iran's collective memory.

That incident and Iran's overall historic bad blood with the Taliban, officially known as the Islamic Emirate of Afghanistan, have made the dynamic between Tehran and the resurgent movement quickly taking control of Afghanistan amid a U.S. military exit all the more complicated.
Back in 1998, Iran amassed more than 200,000 troops along its border with Afghanistan by September amid tensions and uncertainties as Tehran accused the Taliban of slaughtering minorities such as members of the mostly Shiite Muslim Hazara minority community. Iran also sent direct support at the time for the Northern Alliance, the besieged government also supported by Russia, India and other regional states with the exception of pro-Taliban Pakistan.
The tables were turned in 2001 with a U.S.-led military intervention conducted in the wake of 9/11. The United States and allied forces quickly beat back the Taliban and its Al-Qaeda ally, but struggled to shore up Afghan security forces in the two decades since as the Taliban steadily regained their footing.
The lingering U.S. military presence was all met with criticism by Iran as tensions between Washington and Tehran worsened. Iranian officials repeatedly called for a U.S. withdrawal from Afghanistan, a wish finally granted as former President Donald Trump entered into a peace deal with the Taliban and his successor, President Joe Biden announced in May that U.S. troops would leave the country by the symbolic date of September 11, a deadline since expedited to August 31.
And, rather than resist the Taliban's return to a level of influence not seen since the turn of the century, Iran today has so far opted for diplomacy.
Last month, Tehran hosted representatives of both the internationally recognized government in Kabul and the Taliban for talks aimed at promoting peace. But the conflict has only since worsened, with both sides blaming one another for the violence, but the Taliban emerging as the sole victor of a nationwide offensive that has swept across nearly all of the country's borders and up to just about 30 miles from the capital.
Shahrokh Nazemi, head of media at the Iranian permanent mission to the United Nations, highlighted such efforts last month in comments sent to Newsweek, saying that "any issues of common interest can be addressed within the framework of these talks."
"The Islamic Republic of Iran does not interfere in the internal affairs of other countries, and that includes our good neighbor Afghanistan," Nazemi said. "However, Iran has on several occasions reaffirmed its support for holding talks aimed at establishing peace and ending the conflict in Afghanistan."
He also noted the large Afghan refugee community already in Iran due to their home country's decades of conflict.
"It should not be forgotten that Iran has been [and is today] host to millions of Afghan refugees," Nazemi added, "and peace is important to Iran as a neighboring country and to those who wish to return to their homeland to rebuild their lives there."
But new waves of refugees are arriving at the Afghan-Iran border as clashes erupt and the Taliban continues to consolidate power.
On Friday, U.N. High Commissioner for Refugees spokesperson Shabia Mantoo called "on countries neighboring Afghanistan to keep their borders open in light of the intensifying crisis in Afghanistan."

Also dismissing speculation over potential Iranian intervention in the Afghan conflict was the Fatemiyoun Division, a band of Iran-backed fighters made up largely of Hazaras.
The group has been deployed to Syria to support the government of President Bashar al-Assad, who has also received Russian backing in his 10-year war against rebels and jihadis. On Thursday, the Fatemiyoun again denied their forces were set to be repurposed to fight in Afghanistan, and attributed the claim to an axis of hostile media emanating from the Arab World, the West and Israel.
"In denying the claim of the sworn enemies of the oppressed people of Afghanistan and all the Muslims of the world, the Fatemiyoun Division informs that any comment or publication of news in this regard is a lie and psychological operations and media war of the Arab-Western-Hebrew front," the Fatemiyoun said in a statement.
The unrest has, however, prompted new interactions between nearby nations seeking regional stability.
Iranian Supreme National Security Council Secretary Ali Shamkhani discussed bilateral cooperation and the situation in Afghanistan with his Russian counterpart Nikolai Patrushev via telephone on Wednesday.
On Friday, Russian President Vladimir Putin met with his National Security Council "to discuss issues of international cooperation in the field of defense and security."
Shamkhani, for his part, also said Wednesday on Twitter that "the political obstacles to #Iran's membership in the #ShanghaiCO," or Shanghai Cooperation Organization, "have been removed & Iran's membership will be finalized."
The eight-member bloc already includes China, India, Kazakhstan, Kyrgyzstan, Pakistan, Russia, Tajikistan, and Uzbekistan as members, while Afghanistan, Belarus, Iran, and Mongolia serve as observers. Last month, SCO foreign ministers gathered in the Tajik capital of Dushanbe to discuss, among other things, the situation in Afghanistan and establishing group-wide security and counterterrorism strategies.
Next month, SCO states will come together for annual exercises referred to as Peace Mission 2021 with an expected focus on implementing the tactical elements of the goals adopted last month by the group as the situation in Afghanistan continued to deteriorate.

The above graphic was provided by Statista.