Violence broke out in Lakhimpur Kheri district of Uttar Pradesh state during a protest against agricultural reforms.
Photos and videos on social media showed vehicles set on fire as people lay covered in blood.
Opposition leaders have been stopped from visiting the families of the victims as the situation remains tense.
“The prime minister says ours is a vibrant democracy. But stopping opposition leaders from going to Lakhimpur doesn’t really strengthen our democracy. Farmers, who are the backbone of our economy, cannot be treated like this,” he said.
Senior Congress party leader Priyanka Gandhi was also detained on Monday while she was on her way to meet the families of farmers who died in the violence.
Violence in Lakhimpur Kheri marks a dramatic escalation in a 10-month-old protest against agriculture reforms that farmers say will benefit private players at their expense.
It is one of the longest farmers-led protests India has ever seen, pitting the community against Indian Prime Minister Narendra Modi and his Bharatiya Janata Party-led (BJP) government.
How did the violence start?
Farm leaders alleged that Sunday’s violence started after federal minister Ajay Mishra’s son drove his car into a group of protesters.
Farmers had assembled in the district to protest against the visit of Mr Mishra and deputy chief minister Keshav Prasad Maurya.
The protesters were angry with Mr Mishra over his earlier statement in which he said the protests involved just “10-15 people” and that “it would take just two minutes to make them fall in line”.
They had been staging a demonstration on the road when the minister’s motorcade allegedly ran over them, killing two protesters and injuring others, farming unions say.
He alleged that farmers threw stones at his vehicle, which led to the driver losing control and ramming into the protesters.
In subsequent violence, three members of the ruling Bharatiya Janata Party (BJP) and the driver was beaten to death, he added.
“If my son would’ve been there, he wouldn’t have come out alive,” Mr Mishra told news agency ANI.
Police have confirmed the toll, but have not made any arrests so far. They said the four people who were in the car were among those who died in the violence.