By Ed Stoddard

PRETORIA (Reuters) - Police in Pretoria used tear gas and stun grenades to disperse hundreds of students gathered outside South African President Jacob Zuma's offices on Thursday as yet another protest over the high cost of university education turned violent.

Weeks of demonstrations calling for the scrapping of university fees, prohibitive for many black students, have highlighted frustration at enduring inequalities in South Africa more than two decades after the end of white minority rule.

Around 300 protesters had gathered in a park outside the building where the government has its seat in Pretoria, chanting and singing.

"We are here to submit our memorandum demanding free education and the release of the arrested students," said University of Technology in Pretoria student who gave his name as MJ Wa Azania, 26.

He said police had been waiting for them, armed and ready.

Some students hurled sticks and bottles at police, who used water cannon and later tear gas in attempts to disperse the crowd. Each time the crowd returned to the park, until they fled before armored police vehicles.

The police spokeswoman designated to comment on student protests in Pretoria was not available when contacted by Reuters about Thursday's clashes.

Students of Johannesburg's University of the Witwatersrand (Wits) also clashed with police at a demonstration on Thursday, a day after similar skirmishes at the University of the Western Cape in Cape Town.

Students took the streets when the government in September recommended that 2017 university tuition fee increases be capped at 8 percent, higher than the current inflation rate of 6.1 percent.

In a bid to end the protests, the government then said it would pay the 8 percent fee increase through a 2.5 billion rand ($180 million) subsidy for more than 70 percent of all undergraduates.

But this was not enough to appease the students who carried on protesting. Their anger has been compounded by what they say is their unfair treatment by police and the courts. The police has not disclosed the total number of arrests made since the demonstrations started.

Protesters in Pretoria on Thursday cited the case of Mcebo Dlamini, a leader of the #FeesMustFall protests and former president of Wits' student council, who was denied bail by the Johannesburg Magistrate's Court on Wednesday.

Charges against Dlamini include inciting violence and assaulting a woman at one of the protests.

Zuma last week formed a ministerial team to resolve the fees crisis, but the government has said it could not allocate extra funds to education at the expense of health or housing.

Asked about what the government was doing to resolve the crisis, Minister in the Presidency Jeff Radebe reiterated on Thursday the planned subsidy for poor students

(Additional reporting by Tanisha Heiberg in Johannesburg and Wendell Roelf in Cape Town; Writing by James Macharia; Editing by Raissa Kasolowsky)