The villagers had objected to a wall being built by a petrol pump owner adjacent to the temple and alleged 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, who suffered injuries in the clash, were rushed to a hospital.
An injured man, whose identity not could not be ascertained, later died in the hospital, the police said.
Senior officials including the SP, Rakesh Shanker, rushed to the spot with additional forces, the police said.
The SHO of the police station where the clash occurred, Neetish Srivastava, has been suspended, it said, adding that the situation was now under control.