Humeyra Öz was attacked in the bike-shed at Rotterdam’s Design College shortly after her lessons finished on Tuesday afternoon.
A 31-year-old man has been arrested.
The girl’s friends said she had broken up with him some time ago and had complained of being threatened by him.
Police confirmed that she knew the suspect but did not give further details.
Students, teachers and families in the Dutch city of Rotterdam have expressed their shock after a 16-year-old pupil was shot dead in the grounds of her college.
The college has some 300 students and some of them were in the bike shed at the time of the shooting and saw what happened.
Both the victim and suspect were described as members of the Dutch-Turkish community, and Turkish consul Aytac Yilmaz visited the school on Wednesday 19 December.
Fellow pupils struggled to take in the killing, while parents were concerned about safety.
“She was a lovely, pretty, clever girl,” a schoolfriend told Dutch media. “We’re still really scared. How could it happen?”
College chairman Marc Otto said he was unable to talk about any threats made against the victim as it was part of the police inquiry, but insisted that safety at the school was not in question.
“This is about someone older who suddenly comes into a school – this isn’t a prison,” he said.
Rotterdam Mayor Ahmed Aboutaleb said the attack should not be considered as a school shooting but involved a deranged man who could have carried out the attack anywhere.
Supect was know to police:
Humeyra Öz had got to know the suspect, identified as Bekir E, via Facebook two years ago and had ended their relationship on the site too, Dutch media said.
“Her family even went to talk to his family. They said she was too young,” a cousin told the Volkskrant website. “But he kept harassing and threatening her.”
Friends said her father would take her to school because of the threats made against her.
The cousin said the family had filed a complaint against Bekir E around a year ago and that he had recently been given a two-year jail term.
Public prosecutors have confirmed that the suspect was convicted recently and was under the supervision of the probation service, but did not specify the charge.