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.