Indian television station NDTV said at least 31 people had been killed in two days of violence in Muzaffarnagar district of Uttar Pradesh state, 105km north east of New Delhi.
An Indian broadcast journalist and a police photographer were among the dead after the two groups set upon each other with guns and knives in Kawal village.
The violence quickly spread to neighbouring villages in Muzaffarnagar district on Saturday night.
“A curfew has been imposed in three riot-hit areas of Muzaffarnagar,’’ the head of the state’s home ministry, R M Srivastava, said. “The situation is still very tense, but under control.”
An army contingent of up to 800 was dispatched to the area on Saturday night, as armed gangs of Jats, a group practicing Hinduism, stormed a mosque and a village with Muslim residents, he told Reuters news agency.
Soldiers were going door to door to search for weapons. A state of high alert was declared for the entire state of Uttar Pradesh, which has a population of 200 million people.
The clashes broke out after thousands of Hindu farmers held a meeting in Kawal to demand justice in the August 27 killing of three men who had spoken out when a woman was being verbally harassed. The state’s minority welfare minister, Mohammad Azam Khan, said some at the meeting gave provocative speeches calling for Muslims to be killed.
The farmers were attacked as they were returning home after the meeting, senior police official Arun Kumar said.
“The attack seemed well-planned,” Kumar said. “Some were armed with rifles and sharp-edged weapons.”
He said tensions were fuelled by an online video purporting to show the killing of two Muslim youths last month.
A leader from the Hindu nationalist Bharatiya Janata Party said tensions had been simmering since the three men were killed in a tea shop.
“Had the killers been arrested, the situation might not have gone out of hand,” Vijay Bahadur Pathak said.
Uttar Pradesh was at the heart of some of India’s worst communal clashes in December 1992, after a Hindu mob razed the 16th-century Babri mosque in Ayodhya.
The government has warned that India is seeing a rise in communal violence, with 451 incidents reported already this year, compared to 410 for all of 2012.