South Africa's government has backed down on how it carries out a court ruling on asylum, after a day of violent protests. The Department of Home Affairs withdrew a directive that told refugee offices to accept asylum applications from people who had been blocked before, Eyewitness News reported Friday.

The unrest broke out Thursday in Johannesburg's Soweto township and in the coastal city of Durban. At least 24 vehicles were burned and shops were looted, The Associated Press reported. Acting national police commissioner Puleng Dimpane said 10 vehicles were torched in Soweto and 14 in Durban, where three people were arrested.

"The right to raise concerns and to protest does not give anyone the right to commit crime," she said.

In Soweto, the violence started near a Home Affairs office. A community leader said the march began peacefully before residents moved to close foreign-owned shops, and he claimed foreign nationals fired shots, which angered protesters who then set cars alight. Police said they were looking into reports of shots fired at protesters but did not say who fired them. No injuries were reported in Soweto.

In Durban, police said tensions boiled over after a South African protester was allegedly attacked by foreign nationals. Three foreign nationals were arrested over that assault.

The anger stems from a court ruling in July. South Africa's top court struck down rules that stopped some people from seeking asylum, including those who entered the country irregularly or missed deadlines. The ruling does not grant refugee status on its own, and each claim must still be judged, officials said. A government committee admitted that refugee offices were "overwhelmed" by the number of people who came forward.

Home Affairs said the directive was issued by its top civil servant without the minister's knowledge. It said it will design a new approach while still obeying the court. Gauteng Premier Panyaza Lesufi called the move "a major relief."

The protests follow months of tension. Groups such as Operation Dudula have pushed to close foreign-owned shops and deport undocumented migrants, Xinhua reported, and unemployment is above 32%.

What we know: Home Affairs withdrew the asylum directive after violent protests in Soweto and Durban.
What we don't: What new process will replace it, and whether the protests will spread.