The violence broke out Tuesday in Allipur area of Kharkhauda village when the Sheikhs and Qureshis in the area got into an altercation over who will first offer prayers at the Chappar Wali Maszid.
Elders tried to pacify youths from both sides, but they did not listen and hurled stones and fired gun shots at each other.
A mob torched some vehicles and shops. When police reached the spot, they too were attacked and beaten up. They fled the scene to escape the wrath of the mob, an official said, adding illegal weapons were also used to fire.
"A probe has begun and additional security been deployed in the area," an official told IANS.
The situation is now under control. In the last one week, two clashes in Saharanpur and Rampur in the state between members of two different communities erupted that left six dead and many injured.