South African labour minister Thulas Nxesi wants to add as many as 2 million new jobs before the next elections as the nation grapples with one of the highest unemployment rates in the world.

About 12 million South Africans are without jobs. Unemployment according to the expanded definition, which includes people who were available for work but not looking for a job, is at 45.5% – the highest rate on a list of 82 countries monitored by Bloomberg — although some of the data is outdated. Africa’s most-industrialized nation will go to the polls to elect its next president in 2024.

Nxesi’s jobs target adds up to the number of people who were rendered unemployed at the height of the Covid-19 pandemic. Strict labor laws, stagnant productivity, bureaucratic hurdles and a skills shortage have reduced the ability of South African companies to hire additional workers.

“Whether or not that is achievable, I don’t know,” Nxesi said of his goal in an interview in Bloomberg’s office in Johannesburg. The government is working on policy amendments to prioritize South Africans’ access to jobs over foreign nationals with the same skills, he said.

The high unemployment rate has added to anti-immigrant sentiment among some South Africans who resent facing additional competition for jobs. That’s prompted the government to follow through on proposals to enforce employment quotas for foreign nationals.

There’s been a trend of “employment of foreign workers at the expense of the South African workers,” Nxesi said. “The issue is the employers who deliberately employ these vulnerable people.”

Reducing undocumented immigrants will be vital in addressing unemployment, according to Nxesi.

“It’s a very sensitive matter everywhere, but if you look in Zimbabwe, Botswana, Nigeria and Ghana — they have all declared that you can’t bring anyone from outside if there is a national who is able to perform that job,” he said.

To limit the influx of illegal migrants from neighboring nations, South Africa wants to establish a border control agency. The Border Management Authority will have branches at six border posts to begin with, and employ people from various government departments to tighten the implementation of immigration policies.

The lack of jobs is likely to be a key issue in the run-up to the elections in 2024. The state has to find a solution to limit the large number of labor migrants coming from struggling neighboring countries, the minister said.

About 3 million of the 60 million people living in South Africa are migrants, according to the national statistics agency. Many of them are Zimbabweans.

Last year, South Africa said it would end a special dispensation that allows about 178,000 Zimbabweans to live and work in the country. The so-called Zimbabwe Exemption Permits were granted to the nation’s nationals who moved to South Africa before 2009.

The permits will likely be extended for those who re-apply, especially if their skills are needed in the country, Nxesi said.

“We all know that the reason why there are many Zimbabweans here, is because the country has collapsed, that’s the root cause,” Nxesi said.

Read: Cape Town’s 10-point plan to end load shedding and move off Eskom’s grid