Three women and a man were arrested for public violence after illegal structures were demolished in Thembalethu, George, on Tuesday, Western Cape police said.
"The crowd was unruly and our officers had to use stun grenades to disperse them," said Captain Malcolm Pojie.
The police had been on scene to assist the Red Ants and the Sheriff.
The Western Cape human settlements department said 87 illegal structures had been demolished on various portions of land.
This was after it obtained a court interdict to demolish the structures and put up notices.
The structures were built on land which the department had set aside for mixed-use development.
Over 4 000 "housing opportunities" would be delivered in the area as part of the Upgrading of Informal Settlements Programme, said department spokesperson Nathan Adriaanse.
The first phase, consisting of 1 750 housing opportunities, was already complete and beneficiaries had taken occupation.
The department was busy with the second phase.
The invaded area formed part of this phase.
Head of Human Settlements Implementation in the department, Phila Mayisela, said the invasion of land would delay the housing project and affect many beneficiaries who had been waiting patiently for houses.
"We cannot allow a handful of people to delay a project that will benefit thousands of families," she said.
"If people are not happy about anything related to our housing allocation, they are always welcome to talk to us."
All refuse trucks and municipal staff were withdrawn from the area due to safety concerns, said George municipality spokesperson Chantel Edwards-Klose.
Rubbish still had to be collected in Phelendaba, Ondongwe, Silverton, Zone 6 and Zone 9.
"The refuse collection will take place as soon as the situation has resolved."
Pojie said the situation was calm and officers were monitoring the area.