The incident happened on Wednesday after school hours when the two accused took the girl to an isolated place where they raped her, they said.
The girl narrated the incident to her mother who then lodged a complaint with the police.
The two accused were produced before the District Judicial Court today and then sent to juvenile home, police said.
Medical examination of the girl was conducted yesterday and her statement recorded before the magistrate, police said.
An FIR under section 376 (rape) of the IPC and also under sections of POCSO Act registered against the duo, they said.