An apparent passerby has been killed in Johannesburg when South African police fired rubber bullets to disperse a group of protesters near the University of the Witwatersrand (Wits) in the city.

The students protesting on Wednesday first began taking to the streets in early January to demand that those who owe the university up to 150,000 rand ($9,850) in fees still be allowed to register for the new academic year.

The cost of university education, prohibitive for many Black students, has become a symbol of the inequalities that endure in South Africa more than 20 years after the end of apartheid.

Wits student representative council President Mpendulo Mfeka said the man shot was not believed to be a student.

In a statement, the university’s senior executive team said it was “deeply saddened to learn of the passing of a 35-year-old man … outside of the institution this morning”.

“Initial reports suggest that a civilian was caught in clashes between the protesters and SAPS [South Africa Police Services], and regrettably lost his life. At this stage, we do not have confirmation of the cause of his death,” the statement read.

Two student reporters were wounded and three demonstrators were arrested by police and taken to a nearby station, it added.

Meanwhile, Gauteng police spokesman Captain Kay Makhubela, speaking to national talk radio station SAFM, confirmed the death of a “middle-aged man”, but did not say who had fired the fatal shot.

“We are investigating the circumstances of the incident. Police have been in the area of the protest where they’ve been deployed to maintain law and order,” said Makhubela.

The Independent Police Investigative Directorate (IPID) said it was looking into the incident.

“The Directorate has dispatched four investigation officers to probe the allegations, the team will also cordon the crime scene and conduct the investigation including locating the person with the video footage, identify eye witnesses etc,” it said in a statement.

Most students in South Africa are caught up in a group widely called the “missing middle” – those who are not poor enough to qualify for government financial aid but not wealthy enough to pay.

Protesting students took to the streets of Braamfontein district, where the university is located.

“They [police] threw stun grenades to try and disperse the protest but we didn’t run away, so they started firing rubber bullets,” said Mfeka. “The person who was shot was shot directly in the head.”

In 2016, widespread student protests for free higher education forced temporary closures at a number of South African universities.