A wave of demonstrations targeting Iranian diplomatic missions in Taliban-led Afghanistan strained ties between the two neighbors, with Tehran summoning the Afghan charge d'affaires in protest and suspending consular services in the country.
Dozens of Afghans resumed their protests on Tuesday against Iranian "cruelties" after videos appearing to show refugees being beaten circulated widely over the weekend.
Tehran announced the closure until further notice of its Afghan missions "in order to obtain necessary assurances guaranteeing total security," its foreign ministry said.
Iran has hosted millions of Afghan refugees for decades, but fresh waves have flooded the country since the Taliban returned to power in August, testing the patience of authorities and ordinary people. Last week, Iranian Foreign Minister Hossein Amirabdollahian said the number of Afghans in Iran has jumped to 5 million, from nearly 4 million before the Taliban took power last August.
On Tuesday around 200 Afghans gathered at a square in central Kabul, carrying posters reading "Iran should stop its cruelties" and "We want justice." Public demonstrations have been banned by the Taliban, but they allowed it to proceed with armed guards watching.
"The Iranian security forces and even common people there have been treating us badly these days," said protester Manzoor Ahmad Farooqi, recently returned from Iran. "When their police see us they pin us to the ground and beat us."
Tuesday's protest came after videos circulated at the weekend purporting to show Iranian border guards and civilians beating Afghans, although it was unclear when and where the images were filmed. Similar allegations were also raised by Afghan migrants who crossed into Turkey.
Iranian officials have dismissed the videos as "baseless and invalid."
Protests first erupted Monday in Herat, the western city that serves as a launchpad for Afghans wanting to cross to Iran, both officially and illegally. Demonstrators set fire to an Iranian flag outside Tehran's consulate in the city, smashed CCTV cameras and pelted the consulate with rocks.
A statement on Iran's foreign ministry website said the embassy in Kabul had also been targeted.
The statement issued Tuesday said the ministry summoned Afghanistan's charge d'affaires in Tehran "to vigorously protest the attacks on the Iranian embassy in Kabul and the consulate general in Herat."
Human trafficking is big business along their shared 900-kilometer (550-mile) border.
The two nations also have the Persian language in common, known as Farsi in Iran and Dari in Afghanistan, but a majority of Afghans are Sunni Muslims compared to their mostly Shiite neighbors.
Iran has long had testy relations with the Taliban, who raided Tehran's consulate in the northern Afghan city of Mazar-i-Sharif in 1998 and murdered 10 diplomats and a journalist. The Taliban said the raid was carried out by a renegade force acting against orders.
Since the Taliban seized power, Afghanistan has plunged further into economic crisis, pushing even those without links to the former Western-backed government to scramble for an exit.
Thousands of people daily try to cross into neighboring Iran in search of work, or in a bid to reach Europe in the hope of asylum.
Iran has so far not recognized the Taliban government.