South African police have used stun grenades to disperse student protesters outside parliament, where the finance minister was giving a budget speech.

Hundreds of protesters had marched to the parliament building in Cape Town on Wednesday to call for free university education. They burned what they said was a mock wooden coffin for the education minister to show dissatisfaction with the government's response to their demands.

Finance Minister Pravin Gordhan announced some additional funding for higher education in his speech. He also said: "We want the violence to stop."

Sometimes violent protests for free education have hit many South African campuses since last month, when the government recommended that universities increase 2017 fees by no more than 8 percent. It also promised to cover fee increases for poor students.