settled in Iran over the years, had by the early 20th century, become large enough to be officially classified as their own ethnic group, referred to variously as Khavari or Barbari. Young Hazara men have embraced migrant work in Iran and other Persian Gulf states to save money for marriage and become independent; such work has even come to be seen as a "rite of passage". Such migration intensified in the early 1970s due to famine, and by 1978, there were an estimated several hundred thousand Afghan migrant workers in Iran. The Soviet–Afghan War, which erupted in 1979, was the beginning of a series of major waves of refugee flight from Afghanistan. Those who came to Iran often augmented the ranks of migrant workers already there. The new Islamic Republic took place around the same time as the influx of masses of Afghan migrants to other countries, fleeing the plagues of problems in their own country. Iran started recognising those Afghans listed as migrants workers or refugees as legals. They issued them "blue cards" to denote their status, entitling them to free primary and secondary education, as well as subsidised healthcare and food. However, the government maintained some restrictions on their employment, namely prohibiting them from owning their own businesses or working as street vendors. Most of the early academic attention on these new immigrants was focused on Afghan refugees in Pakistan. Studies on Afghans in Iran came later due to the political situation during the Iran–Iraq War. By 1992, a report by the United Nations High Commissioner for Refugees (UNHCR) estimated that there were around 2.8 million Afghans in Iran. Just 10% were housed in refugee camps; most settled in or near urban areas. For their efforts in housing and educating these refugees and illegals, the Iranian government received little financial aid from the international community. With the fall of the Najibullah government of Afghanistan in 1992, Iran began efforts to encourage refugees to repatriate. During these years, there were many reports of cases of Afghans being harassed by Iranian law enforcement officers. Legal residents had their identity cards confiscated and exchanged with temporary residency permits of one-month validity, at the expiry of which they were expected to have left Iran and have repatriated. 21st century Since 2002 millions of Afghan citizens living in Iran and Pakistan have returned to Afghanistan. In 2012, around 173,000 of them were forcefully