The police later sent him to a government hospital in Faridabad for medical examination.
Police said that the hospital authorities constituted a medical board to examine him.
The board recommended that his medical examination be done at PGI Rohtak.
"We produced him before the court which sent him to the observation home on Wednesday," SHO Sarai Kwaja Bhram Singh said.
"The court directed his family and the police to get him medically examined at PGI Rohtak on December 7," Singh said.
The class six student allegedly raped a UKG student of the same school while returning home in Palla area under Sarai Kwaja police station on Saturday last.
The incident came to light on Tuesday when the mother of the victim reached a government hospital in Faridabad to get her daughter medically examined.
The issue was brought to the notice of senior police officers who ordered a medical examination of the girl.
The police had launched search for the boy after registering case of rape against him on Tuesday. Feeling the heat, the family members decided to produce him before the police.