The girl, 16-year-old Sharmin Akter Liza from Ambagh area, was a grade-11 student of Cambridge College.
She came under attack near the local kitchen market while returning home with a classmate after exams on Wednesday afternoon, the college’s founder Johirul Islam told bdnews24.com.
Locals caught the suspect, who is also a grade-11 student of Lincoln College in the neighbourhood, after he had knifed Liza, Johirul said.
Liza was taken to a local clinic first and then to the Shaheed Tajuddin Ahmad Medical College. She was later transferred to the Bangladesh Medical College Hospital where the duty doctor declared her dead.
Her elder brother Nadim Ahmad Sujon said the suspect used to sexually harass Liza on her way to and from the college every day, asking her to engage in a romantic relationship with him and marry him.
Liza had stopped going to the college after the young suspect had threatened her, Sujon said.
Konabarhi Police Station OC Emdadul Hoque said the body was sent to the Shaheed Tajuddin Ahmad Medical College Hospital for a post-mortem examination.
There were knife wounds below her throat, he said and added that the murder weapon was recovered from the scene.