Police said they had blocked access to mobile messaging services to stop "outsiders" from instigating the violence.
Police said they had blocked access to mobile messaging services to stop "outsiders" from instigating the violence between Dalits and members of a higher caste community in Uttar Pradesh state's Saharanpur district, which lies just 120 miles (190 kilometres) from New Delhi.
"We ordered the service providers late Wednesday to suspend internet services as outsiders... were instigating locals with WhatsApp and Facebook posts," senior police officer Bablu Kumar told AFP.
"We have arrested 24 persons and have a massive force presence on the ground. Now the situation is absolutely calm."
It is not clear why violence first broke out earlier this month.
Some reports have said a group of Dalits -- India's lowest caste, formerly known as untouchables -- were unhappy about loud music being played during a procession by higher-caste Thakurs.
Since then Dalits have alleged harassment by the upper-caste men, who they say prevented them from installing a statue of low-caste hero BR Ambedkar on the premises of a local temple.
The latest round of caste clashes broke out when a Dalit man was killed while returning from a political rally earlier this week. On Wednesday an upper caste man was shot and seriously wounded.
Authorities in Uttar Pradesh have since suspended the district police chief and other local officials.
The state's controversial chief minister Yogi Adityanath, a hardline Hindu nationalist, tweeted that those responsible would face "strict action".
"I appeal to people of the state to not pay attention to provocative statements," he also tweeted.
The violence is an embarrassment for India's nationally ruling Bharatiya Janata Party (BJP), which won a landslide election victory in Uttar Pradesh in March on a promise to restore law and order.
Senior police officials say they expect to make more arrests over the recent violence, which included arson attacks.
Uttar Pradesh is India's most populous state and has been the scene of some of the country's worst communal violence.