Parkland - The head of the FBI faced calls to resign on Friday after the agency admitted it had received a chilling warning from a tipster that Florida school shooter Nikolas Cruz could be planning such a massacre but failed to follow up.
The stunning admission by the top US law enforcement agency came two days after Cruz, a 19-year-old with a long history of troubling behavior, killed 17 people at his former high school in Parkland, Florida.
The FBI acknowledgment came amid growing anger among parents and students in the south Florida city over America's seeming unwillingness to toughen gun control laws.
Florida Governor Rick Scott called for Federal Bureau of Investigation director Christopher Wray to step down, saying the failure to take action was "unacceptable."
"Seventeen innocent people are dead and acknowledging a mistake isn't going to cut it," Scott said.
The FBI said a "person close to Nikolas Cruz" made a call to the agency's public tipline on January 5 to "report concerns about him."
"The caller provided information about Cruz's gun ownership, desire to kill people, erratic behavior, and disturbing social media posts, as well as the potential of him conducting a school shooting," the FBI said in a statement.
The information was not handled appropriately, however, the FBI said, and nothing was done.
Cruz, who was expelled from Marjory Stoneman Douglas High School last year, went on a rampage at the school on Wednesday using an AR-15-style semi-automatic rifle that he legally purchased a year ago.
The FBI said the information from the caller "should have been assessed as a potential threat to life" and forwarded to the agency's Miami field office.
Instead, "no further investigation was conducted."
Attorney General Jeff Sessions ordered an immediate review to ensure "effective response to indications of potential violence."
Wray, who took over as FBI chief in August, said he was "committed to getting to the bottom of what happened."
"We have spoken with victims and families, and deeply regret the additional pain this causes all those affected by this horrific tragedy," he said.
The January warning to the FBI was not the first it had received about Cruz.
In September, the FBI was alerted to a message posted on YouTube, in which a user named Nikolas Cruz vowed: "I'm going to be a professional school shooter."
The FBI said it had looked into it at the time but was unable to identify the person who made the post.
As President Donald Trump prepared to visit Parkland, a groundswell arose for a new push to restrict the availability of guns and better protect schools.
"My princess wasn't safe in that school," said Andrew Pollack, at the funeral of his 18-year-old daughter Meadow. "Please pray that this horrific tragedy never happens to another family."
Lori Alhadeff, whose 14-year-old daughter Alyssa was killed, made an emotional appeal to Trump on camera with tears rolling down her face.
"We need action! Action! Action!" Alhadeff urged in an interview with CNN, addressing Trump as the father of an 11-year-old son of his own.
"Let's protect Barron, and let's also protect all these other kids here in Parkland, in Florida, and everyone everywhere else," she said.
Carly Novell, a senior at the school who survived the shooting, said it was time for politicians to act.
"I just want people to stop, like, talking about it and then not doing anything," she said.
Trump tweeted Friday that he planned to meet with victims in the sprawling suburban community about 80km north of Miami, although it was not yet clear when the meeting would take place.
The US leader is spending the three-day President's Day holiday weekend at his Mar-a-Lago resort -- a 45-minute drive from Parkland.
But Trump risked being greeted with angry demands for action on laws that allowed Cruz to amass an arsenal.
"It's illogical that the law says a minor can't have a drink, but can buy a gun," said 47-year-old Mavy Rubiano, whose child survived the shooting.
In Washington, the political response so far makes it clear that the powerful pro-gun National Rifle Association - which spent $30 million to support Trump's election in 2016 - remains formidable.
On Thursday, Trump's nationally televised address made no mention of guns, or of previous mass shootings.
The president focused instead on offering sympathy to the families of the victims and the need to provide better mental health care.
Republican House Speaker Paul Ryan said it was not a time for arguing over gun control, while Republican Florida Senator Marco Rubio said new gun laws alone would not stop shootings.
As with previous mass shootings, the focus of gun control advocates was easy availability of the AR-15, a civilian version of the US military's M16.
Millions have been sold around the United States, and AR-15-style rifles were used in the mass shootings in Las Vegas, Sutherland Springs, Texas and Newtown, Connecticut.