Stone pelters also attacked the policemen on duty at the spot, officials said. (Representational)

At least 12 Kanwar Yatra pilgrims were injured, one of them seriously, when they were attacked by a group of people who objected to their playing loud music outside an Idgah in Badaun, Uttar Pradesh, while Eid prayers were being offered, the police said.

The incident occurred when the kanwar pilgrims, who were returning in a tractor trolley from Haridwar, were passing from in front of the Idgah playing music, they said.

Senior police official Ashok Kumar Tripathi said stones were pelted on the pilgrims and they were "chased for nearly two kilometers for playing loud music on their vehicle while Eid-al-Adha Namaaz was being offered".

Though the pilgrims stopped the music, an argument broke out between the two sides leading to stone pelting by people from one side, the police said.

The stone pelters also attacked the policemen on duty at the spot and at least eight constables, including three women constables, had to take shelter at a nearby petrol pump to save themselves, the police said.

Additional forces and Provincial Armed Constabulary (PAC) personnel were immediately deployed to bring the situation under control, the SSP said.

Kanwar pilgrims are Shiva devotees who undertake the annual yatra from Haridwar during monsoon to collect the holy water of Ganges which they offer to idols of Lord Shiva, especially on Monday, while walking all the way to their home towns.