The Federal Bureau of Investigation was warned in September about an ominous online comment by the 19-year-old man accused of killing 17 people at his former high school but was unable to locate him, an agent says.
Authorities say the ex-student, identified as Nikolas Cruz, walked into the Marjory Stoneman Douglas High School in Parkland, near Miami, on Wednesday and opened fire with an AR-15-style assault rifle in the second-deadliest shooting at a public school in US history.
Cruz may have left warning signs on social media in the form of a comment on a YouTube video that read "I'm going to be a professional school shooter." That comment was passed on to the FBI.
"No other information was included with that comment which would indicate a time, location or the true identity of the person who made the comment," FBI Special Agent in Charge Robert Lasky told reporters. Investigators were unable to find the commenter, he added.
The FBI is conducting an extensive review of how it handled that tip to see if mistakes were made, a federal law enforcement official told Reuters.
Wednesday's shooting was the 18th in a US school this year, according to gun control group Everytown for Gun Safety.
Cruz's court-appointed lawyer said he had expressed remorse for his crimes.
"He's a broken human being," public defender Melisa McNeill told reporters. "He's sad, he's mournful he's remorseful."
Cruz made his first appearance at the Broward County courthouse.
Cruz had done paramilitary training with a white nationalist militia called the Republic of Florida, a leader of the group said.
"He had some involvement with the Clearwater Republic of Florida cell at some point," Jordan Jereb said in a telephone interview. Reuters could not immediately verify the claim.
Cruz loved guns and had been expelled from high school for disciplinary reasons, police and former classmates said.
Authorities said he marched into the school wearing a gas mask and tossed smoke grenades, as well as pulling a fire alarm that sent students and staff pouring from classrooms as he began his rampage, according to Florida's two US senators, who were briefed by federal authorities.
In a brief court appearance, Cruz spoke only two words, "Yes ma'am," when a judge asked him to confirm his name. He was ordered held without bond.
Cruz had recently moved in with another family after his mother's death in November, according to Jim Lewis, a lawyer representing the family and local media, bringing his AR-15 along with his other belongings.
The family believed Cruz was depressed, but attributed that to his mother's death, not mental illness.
People who live on same street as Cruz said he alarmed them by shooting squirrels and rabbits in the neighbourhood as well as chickens being raised in a nearby backyard. Several times a year, they observed law enforcement officials at his house.
"Killing animals was no problem for this young man," said Rhoda Roxburgh, 45, who lived on the block for several years.
A student took this video of classmates hiding in a classroom at Marjory Stoneman Douglas High School in Parkland, Florida, as the gunman opens fire.