TEHRAN, Iran -- The Taliban members who killed her activist husband offered Zahra Husseini a deal: Marry one of us, and you'll be safe.
Husseini, 31, decided to flee. Through swaths of lawless flatlands she and her two small children trekked by foot, motorcycle and truck until reaching Iran.
As Afghanistan plunged into economic crisis after the United States withdrew troops and the Taliban seized power, the 572-mile-long border with Iran became a lifeline for Afghans who piled into smugglers' pickups in desperate search of money and work.
But in recent weeks the desert crossing, long a dangerous corner of the world, has become a growing source of tension as an estimated 5,000 Afghans traverse it each day and the neighbors -- erstwhile enemies that trade fuel, share water and have a tortured history -- navigate an increasingly charged relationship.
In past weeks, skirmishes erupted between Taliban and Iranian border guards. Afghans in three cities rallied against Iran. Demonstrators hurled stones and set fires outside an Iranian Consulate. A fatal stabbing spree, allegedly by an Afghan migrant, at Iran's holiest shrine sent shock waves through the country.
Political analysts say even as both nations do not want an escalation, long-smoldering hostilities risk spiraling out of control.
"You have one of the world's worst-simmering refugee crises just chugging along on a daily pace and historical enmity," said Andrew Watkins, senior Afghanistan expert at the United States Institute of Peace. "Earthquakes will happen."
The perils are personal for Afghans slipping across the border like Husseini. Since the Taliban takeover, Iran has escalated its deportations of Afghan migrants, according to the U.N. migration agency, warning that its sanctions-hit economy cannot handle the influx.
In the first three months of this year, Iran's deportations jumped 60% each month, said Ashley Carl, deputy chief of the agency's Afghanistan mission. Many of the 251,000 returned from Iran this year bear the wounds and scars of the arduous trip, he said, surviving car accidents, gunshots and other travails.
Roshangol Hakimi, a 35-year-old who fled to Iran after the Taliban takeover, said smugglers held her and her 9-year-old daughter hostage over a week until her relatives paid ransom.
"They would feed us with polluted water and hard, stale bread," she said. "We were dying."
The lucky ones land in the jumble of Tehran, squeezing into dank and crowded alleyways. Iran estimates at least a million Afghans have sought refuge in the country over the last eight months.
Like many, Husseini lives in legal limbo, vulnerable to harassment and exploitation. Her boss at the tailor's shop refuses to pay her salary. Her landlord threatens to kick her out. She can barely cobble together enough cash to feed her children.
"We have nothing and nowhere to go," she said from a cramped room in southern Tehran, furnished with just a donated gas heater, chairs and a few velour blankets.
As more Afghans arrive, helping them gets harder. Iranian Foreign Ministry spokesman Saeed Khatibzadeh lamented last month that "waves of displaced Afghans cannot continue to Iran" because Iran's "capacities are limited." Iran's youth unemployment hovers over 23%. Iran's currency, the rial, has shriveled to less than 50% of its value since 2018.
"The biggest challenge is that Iran is not ready for the new situation of refugees," Tehran-based political analyst Rea Ghobeishavi said of the increasing friction between Afghans and Iranians.
Iran has grown more anxious as a string of bloody attacks in Afghanistan targeting the country's minority Hazara Shiites makes clear that extremist threats proliferate despite Taliban promises to provide security.
"There are reports that some extremists are entering Iran easily with refugees," said Abbas Husseini, a prominent Afghan journalist in Tehran, describing mounting paranoia in Iran.
Last month, Iran's most sacred Shiite shrine in the northeastern city of Mashhad turned into a scene of carnage when an assailant stabbed three clerics, killing two -- a rare act of violence at the compound. The attacker was identified in media as an Afghan national of Uzbek ethnicity.
In the following days, a surge of videos agitating against Afghan refugees flooded Iranian social media. Impossible to authenticate, the grainy clips -- footage showing Iranians insulting and beating up Afghans -- have been dismissed as misleading in Iran but in Afghanistan have dominated headlines, stoking public fury.
Demonstrators attacked the Iranian Consulate in the western city of Herat with stones and protested at Iran's Embassy in Kabul. "Stop killing Afghans," pleaded protesters in the Afghan capital. "Death to Iran," chanted crowds in Herat and the southeastern Khost province. Iran suspended all of its diplomatic missions in Afghanistan for 10 days.
Even as the gate of its consulate smoldered, Iran's special envoy for Afghanistan deflected. Hassan Kazemi Qomi blamed the escalating tensions on a vague "enemy" seeking to subvert the nations' relations. Afghan Foreign Minister Amir Khan Muttaqi raised his concerns with the Iranian ambassador.
"The ill-treatment of Afghan refugees in Iran adversely affects relations between the two countries ... allowing antagonists to conspire," Muttaqi was quoted as saying.
His careful tone betrays a troubled history.
In 1998, Iran nearly went to war against the Taliban after 10 of its diplomats were killed when their consulate was stormed in the northern city of Mazar-e-Sharif. But after the U.S.-led invasion, Tehran's Shiite leaders grew wary of the American military presence on their doorstep and took a more pragmatic stance toward the Sunni militant group.
Now, analysts say, with both nations severed from the global banking system and starved for cash, they have come to depend on each other. Neither wants to see tensions mount further.
"Through neighbors, Iran can sanctions-bust, exchange currency, barter and keep its economy alive," said Sanam Vakil, deputy director of Chatham House's Middle East and North Africa Program.
But the neighbors nearly came to blows last week when Taliban guards tried to pave a new road across the border. Iranian guards went on high alert. The vital crossing closed.
Aware of the stakes, the countries are vigorously pursuing diplomacy. Last week, Khatibzadeh promised Tehran would accredit Taliban diplomats for the first time to help process the mountains of consular cases. Taliban officials visited the capital to discuss Iran's treatment of Afghan refugees.
Many of those refugees fleeing Afghanistan's repression and destitution harbor humble dreams: of scraping by as construction laborers, factory workers and farmhands in Iran.
Others, like Hakimi's 9-year-old daughter Yasmin, hope to continue on to Europe. She fantasizes about Germany. Her father, a police officer killed by the Taliban in Logar province, instilled in her the importance of an education, she said.
"We don't want to have a bad future," Yasmin said from her dilapidated Tehran apartment. "We want to become literate people, like my father."