The FBI has confirmed that it was warned about the teenager who allegedly carried out a mass shooting at his former school in Florida.
Nikolas Cruz, who has been charged with 17 counts of premeditated murder, reportedly left a comment on a YouTube video last year stating: “I’m going to be a professional school shooter.”
A user alerted authorities to the post.
Teachers were also warned about Mr Cruz, who was not allowed on campus with a backpack, US media report.
The FBI said it had investigated the YouTube comment but had been unable to fully identify the person who posted it.
- Florida shooting: Live updates
Seventeen people were killed and many more were injured in the attack at Marjory Stoneman Douglas High School in Parkland, Florida. Several people are in a critical condition.
It is the deadliest shooting at a US school since 2012.
What were the warnings?
After seeing a comment on a YouTube post last year by Mr Cruz, 19, user Ben Bennight contacted the FBI with his concerns. He said he spoke to representatives there for about 20 minutes.
Mr Bennight said that the FBI had contacted him again following the school shooting in Parkland.
The FBI confirmed on Thursday that they were made aware of the comment, adding that they had conducted “checks” but were unable to identify the person behind it.
Meanwhile 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.”
- Is it time to arm teachers?
School officials have not disclosed why Mr Cruz was expelled from the school.
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.
“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.
But police said they were not warned of any possible attack by Mr Cruz.
Superintendent Robert Runcie told reporters: “We received no warnings.”
Who were the victims?
Details of the 17 victims are emerging as they are identified.
The school’s assistant football coach Aaron Feis was taken to hospital after jumping in front of students to shield them from bullets. His team tweeted that he had “died a hero”.
- Read more on the victims here
The family of student Jaime Guttenberg confirmed her death in a Facebook post on Thursday, referring to the 17-year-old as an “awesome young girl” and updating her page on the social media site to create a memorial for her.
Her cousin Marc Pollack posted a tribute, writing: “My heart is broken from the loss of this awesome young girl and the pain that our entire family is enduring.”
Ms Guttenberg’s parents earlier said that her brother Jesse had escaped unharmed.
Another student, Alyssa Alhadeff, has been identified by her family as a victim of Wednesday’s shooting. In messages shared on social media, her cousin confirmed that she had been found dead.
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.
- Florida shooting: A survivor’s story
- How the school attack happened
‘There may be no answer’
By Owen Amos, BBC News, in Parkland, Florida
At first, it seems like a normal day in Parkland, Florida. The sky is blue. The palm trees are green. And the temperature is rising.
But, on approaching Stoneman Douglas High, it is clear that nothing is normal about today.
The yellow school buses are parked up, going nowhere. The soccer fields are empty. TV trucks line the neat verges.
While the high school is closed, the nearby elementary school is open. Parents hold their children’s hands tightly as they dodge cameramen.
Lanny James, 77, has a place five miles away in Margate. He comes here for the sun; today, the temperature was 25C by 09.30 local time.
He was playing golf when he heard the news. “I just love South Florida,” he says, adding: “This is supposed to be paradise.”
Lanny, a semi-retired broadcaster, has 10 guns and has hunted since the 1960s.
“I just don’t know what the answer is,” he says. “And there may not be one.”
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.
What else do we know about the suspect?
Broward County Sheriff Scott Israeli said Mr Cruz’s social media profiles were “very, very disturbing”.
Two separate Instagram accounts, now deleted, purport to show Mr Cruz posing with guns and knives.
Mr Cruz allegedly used an AR-15 rifle in the attack, which he had bought legally and which he kept locked up in their house at their request.
- What we know about Florida shooting suspect
What’s the reaction been?
President Donald Trump said the shooting showed that people must report their concerns about others’ erratic behaviour.
Florida Senator Marco Rubio tweeted that the shooting was “designed and executed to maximize loss of life”.
But he said that it was too soon to debate whether tighter gun laws could have stopped it.
“You should know the facts of that incident before you run out and prescribe some law that you claim could have prevented it,” he told Fox News.
- Call for policy change: ‘Prayers not enough’
- Senators singled out over gun lobby funds
Florida Governor Rick Scott said the shooting was “pure evil”, but also refused to be drawn into a discussion about gun control.
“There’s a time to continue to have these conversations about how through law enforcement… we make sure people are safe,” he said.
Florida’s Democratic Senator Bill Nelson asked what it would take “for enough to be enough”.
“Sandy Hook, Pulse nightclub, [Fort] Lauderdale airport, Las Vegas and now Parkland, Florida – when is this going to stop?” he wrote on Twitter.
Democratic Senator Chris Murphy tweeted that it was time to debate gun violence, adding that political leaders needed to act to prevent “this slaughter”.