South Africa is preparing for the national shutdown on June 30 with calls for illegal immigrants to leave the country.

The Institute for Economic Justice (IEJ) has warned that South Africa risks repeating some of the darkest episodes of its democratic history unless government acts decisively against anti-migrant violence, hate speech and vigilante groups whose activities have intensified in recent months.

In a seven-page statement titled They Are Us: Government Must Act Against Anti-Migrant Rhetoric and Vigilante Violence, and Urgently Address Socioeconomic Deprivation, the organisation argues that public frustration over unemployment, poverty and deteriorating public services is being redirected towards migrants instead of the structural causes of South Africa's economic crisis.

"Everybody wants, and has the right to, decent work, dignified public services, food, shelter, and safety," the IEJ said.

"The anger people feel towards these unacceptable conditions is understandable and needs to be addressed. The IEJ also rejects such conditions being used to justify violence against vulnerable groups."