While Iranians would bear the brunt of Donald Trump's visa ban, if it ever comes into force, international officials say the country has quietly emerged as one of the most generous towards refugees.
"The leadership demonstrated by the Iranian government has been exemplary in hosting refugees and keeping borders open," said Sivanka Dhanapala, who heads the UN High Commissioner for Refugees team in Tehran.
"It's a story that's not told often enough." Iran has been sheltering a million registered Afghans for almost four decades, and NGOs estimate there are around two million more living under the radar.
That's the fourth-largest refugee population in the world, the UN says.
Yesterday a federal court in Hawaii halted Trump's new visa ban on six mostly Muslim nations including Iran, with a judge ruling there was a strong likelihood it would cause "irreparable injury" should it go ahead.
If it comes into force, the executive order would have a particularly tough impact on the one million Iranians living and studying in the US, as well as their families.
Foreign NGO workers have noted the irony that Iran is targeted by the ban while it continues to deal with huge numbers who have fled an American-led conflict.
Dhanapala highlighted the 2015 decree by supreme leader Ayatollah Ali Khamenei ordering schools to take in all Afghan children, documented or not - a move that left authorities scrambling to build the equivalent of 15,000 new classrooms.
"We've also worked with the government on incorporating refugees into a government-sponsored health insurance scheme which is a ground-breaking development not just for Iran but globally for refugees," Dhanapala said.
Officials are well aware that Afghans still face a harsh existence in Iran.
As in many countries, Iranians are less than pleased to be hosting so many poor foreigners, especially when their economy has been battered by years of sanctions and mismanagement.
The result is that Iran does a lot to discourage Afghans from staying, rounding up the undocumented and sending them home.
"Even someone like me, who was born in Iran and has lived here 36 years, is not yet an Iranian citizen and the discrimination I face in my education and work is suffocating," said one Afghan, a relatively well-established professional in Tehran, who asked to remain anonymous.
He is still grateful for his residency permit, which must be renewed every six to 12 months.
"I have never seen Afghanistan, except for the bad images on the media and I truly fear returning," he said.
"But for 36 years, I have lived in fear of my residency papers not being renewed and it has made life bitter for us."
Iran has tried to encourage voluntary repatriation, but with a still-raging conflict and moribund economy, only 2,426 went home of their own free will last year - a record-low figure according to the UN.