Arrestee Obaidul Khan yesterday confessed to a Dhaka court of stabbing to death Suraiya Akhter Risha, a student of Willes Little Flower School and College, late last month.
Metropolitan Magistrate Ahsan Habib recorded Obaidul's statement at his chamber, said court sources.
The magistrate later sent the accused to jail in the murder case.
Inspector Ali Hossain of Ramna Model Police Station, also the investigation officer of the case, produced Obaidul before the court.
The suspect told the magistrate that he stabbed Risha after failing to persuade her into a romantic relationship with him, added the sources.
A Dhaka court placed Obaidul on six-day remand in the case on Thursday, a day after police arrested him from Domar upazila in Nilphamari.
Assistant Commissioner (Ramna zone) Shiblee Noman of Dhaka Metropolitan Police said based on information gleaned from Obaidul, they seized a knife, suspected to have been used in the killing, from a dustbin in the city's Segunbagicha on Friday.
Risha, an eighth grader, died at Dhaka Medical College Hospital on August 29, four days after she was stabbed in front of her school at Kakrail.
The schoolgirl had secured GPA-5 in her primary terminal exams and was hopeful of doing equally well in Junior School Certificate exams this year.