SRINAGAR, Kashmir — On July 8, Burhan Wani, a 22-year-old rebel, was shot dead by Indian soldiers and police officers in a small village in the central part of Indian-controlled Kashmir. News of his killing spread as fast as the bullets that had hit him. Cellphones, emails, social media went wild: “They’ve killed Burhan! They’ve killed Burhan!” Everybody called Burhan by his first name.

He had become an Internet sensation over the past year, first in Kashmir, then in India and Pakistan, after putting together a small band of Kashmiri militants. Barely out of their teens, they had taken to the forest and social media to challenge the Indian government. Photos they posted on Facebook show them in military fatigues and with stubbly chins, posing with AK-47s against backdrops of apple orchards or mountains. In one video, Burhan plays cricket.

A dozen boys with a few guns — they were no threat to the Indian army, one of the largest in the world. There is no record of Burhan and his crew waging any attack. Their rebellion was symbolic, a war of images against India’s continuing occupation of Kashmir, where about half a million of its soldiers, paramilitary and armed police are still stationed.

According to top police officials, Burhan and two other militants were killed on the evening of July 8 in a gun battle that broke out after Indian soldiers and Kashmiri police surrounded the house in which they had sought shelter.