Nearly 3,000 angry villagers shaved the heads of two Indian soldiers and paraded them naked in the Indian portion of Kashmir, accusing them of trying to molest a teenage girl while posing as Islamic rebels, police and local residents said Wednesday.

"Down with the Indian army," "The culprits be hanged," citizens shouted in Bandipore, a town 40 miles north of Srinagar, the summer capital of India's Jammu-Kashmir state.

Police arrested the two soldiers and charged them with trespassing and attempting to molest a female, said police officer Imtiaz Hossain.

Brig. V. Garg, the area army commander, acknowledged that the two were Indian soldiers, but said they were taken hostage Tuesday by some residents of Kunan, a nearby village, where they had gone to collect intelligence.

"The two soldiers were on patrol duty when civilians took them hostage. Nonetheless, we have initiated our own investigation into the matter," Garg told The Associated Press.

A villager in Kunan, Mohammed Iqbal, told reporters that two people posing as Islamic militants entered his home on Tuesday and tried to molest his 17-year-old daughter.

Angry local residents overpowered the two, shaved their heads and paraded them naked to the office of the district administrator, Iqbal said.

The crowd pelted police with stones, and 10 civilians and five policemen were injured, Hossain said.

Police took the two soldiers into custody after firing in the air and using tear gas and bamboo sticks to disperse the crowd, Hossain said.

Kashmiris deeply distrust Indian soldiers, who have been battling a separatist insurgency in the territory since 1989.

Nearly a dozen rebel groups have been fighting for Kashmir's independence from India or its merger with neighboring Pakistan. More than 68,000 people have been killed in the conflict.