The clash at Diepsloot, about 25km north of Johannesburg, underscored lingering problems with housing in South Africa, where 10 years after the end of apartheid, some 7.35 million people still live in shacks and squatter homes.
About 50 police backed by armoured personnel carriers were locked in a standoff with some 500 residents who said they did not want to move from their township.
Residents said they were angry after being told by community leaders they would be moved to the town of Brits, some 60 kilometres west of Pretoria, which would put them miles from their jobs.
Police said they had arrested 23 people since Monday, when rioting began with residents setting fire to cars and buildings and throwing stones at police.
Diepsloot is made up of thousands of low-cost housing units and squatter shacks.
"There was public violence from 6am to 8am this morning (2pm to 4pm yesterday AEST) and we were forced to act. Police used a water cannon to split up the demonstrators and the road has been closed," said Pretoria police spokesman Percy Morokane.
"A short while later, we received information again that there was some stone-throwing and we had to use rubber bullets," he said.
By early today, police and provincial government officials were still in negotiations with community leaders, who threatened to continue the violence unless a written assurance were given that people would not be moved out of the area.
"We are fighting. Our leaders have told us that we are going to Brits," said resident Lena Mungadi, 24.
"They were shooting at us," she said of the police, who had blocked off a main road leading past the township.
"We are not happy here in Diepsloot. We have been told that we are going to be moved to Brits," said Thomas Maluleke, 22.
"We need someone to come here and tell us what is going on," he said.
The provincial government confirmed that the squatters were to be evicted from low-cost government housing but accused community leaders of whipping up violence.
"These people who are illegally occupying the homes, have now been told by their leaders, who are pursuing their own political agendas, that they would be moved to Brits, west of Pretoria, which is a total lie," said Gauteng provincial spokesman Mongezi Mnyani.
"This is what sparked the rioting in the area," he said.