The rioting was sparked by an altercation which took place over hoisting of religious flags, they said, adding the groups pelted stones and attacked each other with sticks.
Additional police forces were rushed to disperse the clashing groups, a senior police officer told PTI.
Police pickets were set up in Devarkonda where the situation has been brought under control, he said.
"The mobs pelted stones and attacked each other with sticks, resulting in injuries to four persons," the officer said.