The 17-year-old boy, who fired at a protest rally against India's new citizenship law, left his home after telling his grandfather he was going to school.

Instead, he turned up 80km (50 miles) away near the Jamia Millia Islamia (JMI) university in capital New Delhi, where he pulled out a gun and shot at a crowd protesting against the Citizenship Amendment Act (CAA), which critics say violates India's secular constitution and is anti-Muslim.

More:

The incident, captured in dramatic pictures and videos on Thursday, was the first time a civilian had opened fire on protesters in the capital, raising fears that more Indians would take the law into their own hands as sometimes deadly protests rock the country.

The CAA, brought in by the Hindu nationalist government that fast-tracks Indian citizenship for non-Muslim minorities from three neighbouring countries, has divided opinion, with the Hindu majority and Muslim minority often taking opposing sides.

Family members, neighbours, and a school official in Uttar Pradesh state's Jewar town, described the boy as quiet and ordinary. They were surprised by his act of violence.

In social media posts and conversations with some classmates, he spoke of restoring Hindu pride and expressed admiration for a right-wing activist whom police have accused of fomenting violence.

"He wanted to do things for Hindus, he had that in his heart," classmate Shivam told Reuters News Agency. "For years, he had said he was going to do something big."

Reuters has not been able to establish how the boy planned the attack outside the JMI university or how he acquired the rudimentary gun. He fired a single shot, wounding a Kashmiri student in the hand.

WhatsApp messages with another classmate, seen by Reuters, show that he asked for several thousand rupees three days before the shooting incident, without revealing why.

Protests against CAA have flared since last December, with hundreds of thousands taking to the streets [Adnan Abidi/Reuters]

Upheaval over the new law

Protests against the CAA have flared since last December, with hundreds of thousands of people taking to the streets across the country.

Prime Minister Narendra Modi's government insists the law is required to help persecuted minorities who fled to India before 2015 from Afghanistan, Bangladesh and Pakistan.

However, protesters say the law - as well as a proposed National Register for Citizens - discriminates against the country's Muslims, who form nearly 15 percent of India's 1.3 billion population.

At least 29 people have been killed in clashes with police.

In recent days, leaders from the governing Bharatiya Janata Party (BJP) have called for action against the protesters, accusing them of being "unpatriotic".

This week, India's minister of state for finance, Anurag Thakur, encouraged supporters at a state election rally in New Delhi to chant slogans, calling for "the traitors to be shot", drawing a reprimand from the country's election commission.

'We are with him'

Hours after the shooting, small groups of people walked past the boy's house in Jewar, shouting Hindu slogans in support of his actions.

"What he did was unconstitutional, but we are with him," a neighbour said, declining to be named.

Hindus, Muslims and members of smaller religious minorities live cheek-by-jowl in Jewar, typical for towns and cities in Uttar Pradesh, Indian's most populous state.

Family members said the boy usually split his time between school and home, which adjoins his father's small sweet shop, and mostly kept to himself.

In recent days, he was seen spending a lot of time on his phone. "We tried talking to him but we couldn't get him to open up," his father said.

"I'm still not able to understand what happened," added the boy's grandfather, wrapped under a blanket in their family home in a crowded lane dotted with shops and Hindu temples.

Right-wing links

On his two known Facebook accounts, which have been taken down by the company, he posted calls for Hindus to unite.

Some posts featured him posing with weapons, according to a review of his profiles before they were removed.

In March 2018, the boy asked friends via Facebook to join a meeting of the Bajrang Dal, a hardline Hindu group tied to the ruling BJP. Days later, he shared photos of himself at the meeting.

Praveen Bhati, a local leader from the far-right Bajrang Dal, denied the boy was a member of the group.

Bajrang Dal is the youth wing of the World Hindu Council, which forms a part of what is called the Sangh Parivar (Sangh Family) in India.

The Sangh Parivar is named after their parent organisation, the Rashtriya Swayamsevak Sangh (RSS or National Association of Volunteers), which draws its inspiration from the German Nazis.

Some classmates said they were aware of his support for Hindu nationalism for at least three years, partly from his social media posts.

The classmates said he idolised right-wing activist Deepak Sharma, whom police accused of instigating violence against students from Afghanistan at a north Indian university in 2018.

At least two social media profiles of the boy - on Facebook and WhatsApp - had Sharma in the main display picture.

Sharma said he remembered meeting the boy and recognised a photograph with him. "I am not in touch with him," Sharma told Reuters, adding that he had quit activism.

Police in New Delhi, who are holding the boy in custody, could not be reached for comment on their investigation.