He was arrested under POCSO Act, on Friday.
Police told the court that to carry out an investigation inside the madarsa where the incident took place, they would need the cleric along with them.
According to reports, the girl went missing after she went to the market on April 21.
After a case was registered in this regard by the victim's father, the police found a CCTV footage in which the accused was seen taking the girl along with him.
The police subsequently traced the juvenile and apprehended him, they and rescued the girl, on April 22.
The accused minor was sent to a juvenile justice home. (ANI)