Teachers were warned in advance about the teenager who allegedly carried out a mass shooting at his former school in Florida, US media are reporting.
Nikolas Cruz has been charged with 17 counts of premeditated murder following the deadliest shooting at a US school since 2012.
A teacher said Mr Cruz was not allowed on campus with a backpack.
Seventeen people were killed in the attack and many more injured. Several people are in a critical condition.
Mr Cruz, 19, apparently left the scene of the shooting by blending in with fleeing students, but was arrested several miles away and is now in police custody.
What was the warning?
Maths teacher Jim Gard told the Miami Herald that school authorities had emailed teachers about Mr Cruz’s behaviour.
“We were told last year that he wasn’t allowed on campus with a backpack on him,” Mr Gard told the Miami Herald.
“There were problems with him last year threatening students, and I guess he was asked to leave campus.”
The school’s 3,000 students were almost at the end of their day when the attack broke out
School officials have not disclosed why Mr Cruz was expelled from the school, but student Victoria Olvera, 17, told the Associated Press it was because of a fight with his ex-girlfriend’s new boyfriend.
She also claimed he had been abusive towards the ex-girlfriend.
Former schoolmate Joshua Charo said Mr Cruz had been found with bullets in his backpack.
“I can’t say I was shocked,” Mr Charo said.
Nikolas Cruz was arrested an hour after the attack
“He seemed like the kind of kid who would do something like this.”
Some other students echoed that opinion when interviewed.
“Everyone predicted it,” one told WFOR-TV.
Mr Cruz did not give any warning of the attack to police, however.
Superintendent Robert Runcie told reporters: “We received no warnings.
“Potentially there could have been signs out there. But we didn’t have any warning or phone calls or threats that were made.”
According to reports, Mr Cruz told the family he was staying with that he did not want to go to college because it was Valentine’s Day.
What happened at the school?
Reports suggest that a fire alarm at Marjory Stoneman Douglas High School in Parkland, Florida, was deliberately set off at 14:30 local time (19:30 GMT).
The alarm caused some students and staff to leave their classrooms.
Witnesses said that the gunman was deploying smoke grenades and wearing a gas mask.
Students told US media they hid under desks or in-store cupboards or barricaded doors as loud shots rang out.
A teacher told WSVN that she hid in a closet with 19 students for 40 minutes and that the school underwent training for such a situation six weeks ago.
Caesar Figueroa, a parent, told CBS News his daughter was hiding in a closet when she called him.
He told the news outlet that he told her not to call him because he did not want the gunman to hear her voice.
“It’s the worst nightmare not hearing from my daughter for 20 minutes, it was the longest 20 minutes of my life,” Mr Figeuroa said.
Police and Swat team members swarmed the campus and began clearing students from the school, as parents and ambulances converged on the scene.
Mr Cruz was detained in the nearby town of Coral Springs. He was then treated in hospital and taken into police custody.