In a heart-wrenching incident in the restive Indian state of Jammu and Kashmir, a police officer was stripped naked by an angry mob and stoned to death outside a historic mosque in Srinagar where he was on security duty.

The incident, which made national headlines and was strongly condemned by political and religious leaders, took place on Thursday (22 June) when hundreds of people had gathered at the Jamia Masjid — the mosque — for late night prayers called "Shab-e-qadr". Muslims around the world are observing the holy month of Ramadan and the prayer was part of the rituals.

It was not immediately clear what angered the crowd, but Deputy Superintendent of Police (DSP) Mohammad Ayub Pandith was allegedly lynched after he was seen clicking pictures of people coming out of the mosque. The officer reportedly opened fire on the mob in his defence that left three people injured. However, the crowd overpowered him and began beating him up brutally, leaving him dead.

"The DSP was posted at the access control of the mosque to prevent miscreants from vitiating the atmosphere so that people could offer prayers in peace. But a few among those, for the security of whom he had been deployed there, lynched him," Director General of Police SP Vaid explained to reporters.

Vaid added that they have arrested two suspects and a third has been identified. Investigation is ongoing.

"All of them (involved in the lynching) will face the law," the DGP said on the sidelines of the wreath- laying ceremony for the slain officer.

The state's Chief Minister Mehbooba Mufti termed the incident "shameful" and warned that public attacks on security personnel could lead to a backlash. She was apparently referring to violent incidents during the recent by-elections in the state when people opposing the democratic process pelted stones at security personnel stationed to guard the polling booths.

"There is no bigger, shameful incident than this. And more importantly, this DSP thought that this is his own area. On this auspicious day, he had told security guards to go home and perform night-long prayers. There could be no bigger murder of trust than this," Mufti reportedly said.

"They (police) are extremely brave and courageous. They are exercising extreme restraint considering the fact that they are dealing with their own people... The day their tolerance wanes, I think it will become extremely difficult. How long will this continue?"

Former chief minister Omar Abdullah also condemned the killing. "His death is a tragedy & the manner of his death a travesty. May the people who lynched Dy SP Pandith burn in hell for their sins," he wrote on Twitter.