Police said they fired in the air after a lathicharge in which scores of people were injured.
Eleven buses were damaged in stone pelting by the groups which clashed after garlands were thrown at some onlookers and some vehicles attacked.
The situation had been brought under control, though it remained tense this evening, police said.
Two persons, who were part of the funeral procession, died when one of them fell down from a tractor while another rammed his two-wheeler into a wall, allegedly under inebriated state, they said.
More From This Section
The two groups attacked each other with stones and petrol bombs.
One seriously injured had been hospitalised while others were treated as outpatients.
Armed police were monitoring the situation closely. IGP Abhayakumar Singh and DIG Arivuselvam were camping in the town to monitor the situation while striking force personnel carried out patrol in the affected area, police said.