Two men have been arrested in connection with the rape of a six-year-old schoolgirl in the southern Indian city of Bangalore while the main accused, who was initially thought to have committed the crime, was found to be not guilty, police said.

The alleged perpetrators of the sexual assault, aged 21 and 28, are working as gym instructors with school, where the rape reportedly took place.

"A complaint of rape has turned out to be a case of gang-rape after the arrest of two more persons in the Vibgyor High school case," Bangalore Police Commissioner M N Reddi told reporters.

The incident is said to have taken place on 3 July but came to light only two weeks later. Since then, widespread protests have taken place demanding speedy action from police officials.

Mustafa, a skating instructor at the school, was arrested after days of protests following which the chief of the chain of schools was also detained for alleged negligence.

"Mustafa was not present there at the time of crime. He was arrested because of circumstantial evidence but he has now been booked for gross misconduct in another school," said Reddi.

While further investigation is under way, one of the accused is believed to have confessed to the crime.

Another senior police official at the press conference, Abhishek Goyal, said: "The case has been solved in terms of identifying culprits. Two persons, Lalgiri and Wasim Pasha, both gym teachers, have been arrested."

"The child was not in the dark room as suspected earlier when the crime happened but it happened in the premises."