The US-based advocacy group Human Rights Watch (HRW) has accused Iran of violating its legal obligations towards refugees from Afghanistan and failing to protect them from abuse.
In a report published on Wednesday, HRW says thousands of Afghans have been summarily deported from Iran without a hearing of their right to remain.
Thousands of Afghans enter Iran illegally every year.
About 2.4 million Afghans are resident in the country.
'Real and serious danger'
In its report, HRW says Iranian officials "have in recent years limited legal avenues for Afghans to claim refugee or other immigration status in Iran, even as conditions in Afghanistan have deteriorated".
Iran's home office says that around two-thirds of the Afghans resident there are illegal immigrants.
"Iran is deporting thousands of Afghans to a country where the danger is both real and serious," said Joe Stork from HRW's Middle East division.
"Iran has an obligation to hear these people's refugee claims rather than sweeping them up and tossing them over the border to Afghanistan."
HRW said it had evidence of violations including physical abuse, detention in unsanitary and inhumane conditions, forced labour and separation of families.
Last year the Iranian government passed a law that restricts residence permits to those Afghan immigrants who live in three of Iran's 31 provinces.
In November, it ordered 300,000 Afghans living in the country on temporary permits to leave, HRW said, adding that so far the plan had not been implemented.
HRW said the Iranian government's policies meant many undocumented Afghan children could not go to school, and migrants recognised as refugees were limited to "dangerous and poorly paid" manual labour jobs.
And the group warned of rising anti-foreigner sentiment in Iran which was leaving the Afghan population at risk of physical violence.