South Africa’s government has signed an agreement with trucking associations to end frequent blockades of key trade routes that are estimated to have cost the economy millions of dollars.

Truckers regularly block major arterial roads in protest of the hiring of foreigners as drivers, including last week when a key route to South Africa’s biggest port and commercial hub of Johannesburg was disrupted. The blockades will stop while a taskforce develops a plan to address truckers’ concerns, particularly around the hiring of foreigners, according to the terms of a deal signed on Monday. 

The country’s Road Freight Association estimates the disruptions may have cost the economy around 300 million rand ($18.7 million). The protests have also had a “negative impact on investor confidence, critical supply chains and ultimately the economy,” Labour Minister Thulas Nxesi, who heads a panel set up last year to address the blockades, said at the signing.

The government will also deploy the police on national roads “should the need arise,” Nxesi said, and has arrested 213 foreign truck drivers for breaking immigration laws. He said that driving is not a rare skill, despite claims by operators who have defended hiring foreigners over locals.

High unemployment in Africa’s most-industrialized economy has fueled anti-immigrant sentiment among some South Africans who resent facing additional competition for jobs. 

Earlier this year, the government proposed employment quotas for foreigners to try curb the unemployment rate, which is at a near-record 34.5%. That process is still ongoing. Ministers who engaged the trucking industry will meet with anti-immigrant group Operation Dudula later this week.