The incident occurred after villagers objected to a wall being built by a petrol pump owner adjacent to the temple, alleging he was encroaching on its land.
The heated argument between the villagers and the petrol pump staff turned violent when an unidentified man opened fire, killing Indrajit Kushwaha (22) and Ram Prakash (30) on the spot. Five people suffered injuries in the clash.
Twelve people were taken into custody for questioning and the bodies have been sent for post-mortem, they said.