Thousands of people have marched in India to protest against alleged police inaction after a six-year-old girl was raped at a school in Bangalore, the country's technology hub.

More than 4,000 parents and relatives of children who attend the school shouted slogans against the school's administration on Saturday, and demanded that police arrest those involved in the July 2 incident, which was reported only this past week.

The rape has raised questions about the safety of India's schoolchildren and sparked nationwide outrage over rampant sexual violence against girls and women.

The school has refused to take responsibility for the crime.

The protesters squatted outside a police station and refused to move until the city's police chief assured them the suspects would be arrested.

Police said eight members of the school's staff had been detained for questioning.