JOHANNESBURG — South African police battled students on a university campus on Thursday in the latest violence over protesters’ calls for free education, a demand that the government has dismissed as unrealistic in a country with a weak economy.

Police fired tear gas at stone-throwing students on the University of KwaZulu-Natal campus in the city of Pietermaritzburg, South African media reported. Police surrounded a student residence where protesters gathered, the African News Agency reported.

Several hundred students and university staff also rallied outside parliament in Cape Town to demand more financial support for higher education. The University of Cape Town was closed in recent days because of student protests.

Violent protests occurred earlier this week at several South African universities, including the University of the Witwatersrand in Johannesburg.

The demonstrators have been reacting to a government announcement that universities can increase fees by up to 8 percent next year. The government also promised to pay about $180 million to cover the costs of poor students in 2017, a measure that it says will benefit more than 70 percent of undergraduates.

University students have the right to protest peacefully, said Blade Nzimande, the education minister. But he condemned violent protests by what he called “fringe and rogue elements exploiting the situation through acts of hooliganism and criminality for their perverse agenda.”

South African universities need tens of millions of dollars annually to function, and students who can afford to pay for education should do so, Nzimande said.

The government made a concession to students after big protests in 2015, agreeing to freeze fee increases for this year.

Follow Christopher Torchia on Twitter at