GENEVA — Hundreds of thousands of hungry, exhausted and often battered Afghans have been expelled from Iran in recent weeks, under a harsh deportation drive that accelerated sharply last month, international aid workers say.

Since March, when Iranian authorities ordered residents without legal status to leave the country, about 800,000 Afghans have poured across the border, Babar Baloch, a spokesperson for the United Nations’ refugee agency, said Monday. Almost 600,000 of them have been forced out since June 1.

During and since the 12-day war between Israel and Iran last month, Iranian officials have repeatedly cast suspicion on Afghans as possible spies for Israel, amplifying long-standing rumors and tensions. In that environment, and with the approach of a July 6 deadline set by the Iranian government, the pace of migrations soared to an average of about 30,000 per day recently, peaking Friday at more than 50,000 people crossing into Afghanistan, Baloch said.

Iran has ranked as the world’s biggest host country for refugees, with nearly 3.5 million according to the United Nations, primarily people who fled decades of war and violence in Afghanistan. Aid groups estimate that in reality, the Afghan population in Iran is much larger — including about 2 million refugees who are without legal status — and Iran’s patience with them appears to have run out.

Iranian authorities say that Afghans with proper documents are still accepted, and U.N. officials confirm that some of those returning to Afghanistan in recent weeks had received visas from Iran’s consulate in the western town of Herat to go back to Iran. But most Afghans in Iran face a harsher reality.

“The gloves are off,” Arafat Jamal, the U.N. refugee agency representative in Kabul, Afghanistan, said in a phone interview.

Even before the war, Afghans faced barbed taunts about taking subsidized food from the mouths of Iranians.

Returnees, including refugees with valid legal documentation for being in Iran, describe being picked up by the police from their places of work or seized on the street, and then being forced into buses and held in detention sites before being transported to the border. They also relate endless extortionate demands for bribes to get out of detention centers, onto buses or finally to get across the border.

The returnees, from urban professionals to day laborers, include many who were born in Iran, have never set foot in Afghanistan and are more attuned to Iranian culture and society than the more draconian rule of the Taliban, Jamal said.

“The big concern is what happens to these people. They are from this country but hardly of it,” Jamal said. “They are bewildered, disoriented and very sad at leaving their work or their lives in Iran.”

But their arrival also imposes a heavy strain on the resources and, potentially, the stability of communities in Afghanistan, where nearly half the population lives below the poverty line and millions go short of food. Afghanistan, with a population of about 44 million, has absorbed more than 3.5 million returnees since September 2023, U.N. officials say, including hundreds of thousands forced to leave Pakistan.