Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

PARKLAND, Fla. — Less than six weeks before Nikolas Cruz committed one of the deadliest school shootings in American history, someone who knew him called an FBI tip line to complain about him, the agency revealed on Friday.

But no one followed up.

Cruz allegedly fatally shot 17 people and injured many more in a Wednesday attack on his former school, Marjory Stoneman Douglas High School in Parkland, Florida.

In a statement, the FBI said "a person close to" Cruz called the agency's public tip line on Jan. 5 and left information on 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 tip should have been "assessed as a potential threat to life" and forwarded to the bureau's Miami field office for investigation. "We have determined that these protocols were not followed," the agency said.

FBI Director Christopher Wray said in that statement that the bureau is trying to figure out how the mistake occurred, particularly because the bureau asks the public to "be vigilant" against threats and share them with authorities.

He also acknowledged the suffering the revelation will cause victims, survivors and their families.

“We have spoken with victims and families, and deeply regret the additional pain this causes all those affected by this horrific tragedy," Wray said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Wray's admission focused more criticism on the FBI, which has come under pressure from President Donald Trump and other Republicans over its handling of investigations into the Trump's 2016 campaign, and that of his rival, Hillary Clinton.

Florida Gov. Rick Scott on Friday called for Wray to resign.

“We constantly promote ‘see something, say something,’ and a courageous person did just that to the FBI. And the FBI failed to act," Scott said. "‘See something, say something’ is an incredibly important tool and people must have confidence in the follow through from law enforcement."

Sen. Marco Rubio, R-Fla., called on Congress to investigate FBI tip-checking protocols.

Attorney General Jeff Sessions ordered an "immediate review" of the mistake and of the protocols for responding to tips. “It is now clear that the warning signs were there and tips to the FBI were missed. We see the tragic consequences of those failures," Sessions said.

And Chris Grady, a 19-year-old senior who survived the shooting, said the victims "might be alive today if they had done their job."

Related: Florida community grieves at vigil after mass school shooting

“Our government is failing us,” Grady said. “They need to do their freaking jobs. I’m sorry, but this is so infuriating.”

Nikolas Cruz poses in a picture posted to his Instagram account which was verified by the Miami Herald. via Instagram

Ryan Servaites, a 15-year-old freshman who was trapped in the school auditorium when the shooting started, reacted to the FBI news, saying, “It makes everybody here really, really angry that the FBI didn’t follow the proper protocols. This should never have happened.”

The FBI's revelation came as the first victims' funerals were held, for students Meadow Pollack, 18, and Alyssa Alhadeff, 14.

Meanwhile, the owner of the gun store where Cruz bought the AR-15 rifle used in the shooting expressed horror at his connection to the massacre.

Douglas Rudman, lawyer for Michael Morrison, the owner of Sunrise Tactical in Coral Springs, said Friday his client was "mortified that when you turn on the news and you see something horrible happening, that feeling that he may have had something to do with it. He's having a tough time really coming to grips with that."

Cruz bought the gun in February 2017, according to authorities. Another Morrison lawyer, Stuart Kaplan, said the store did a full background check, had Cruz provide identification and asked him several questions, including whether he'd been found to have mental illness. Cruz answered no, Kaplan said.

Since the shooting, students and teachers and former neighbors have described a troubled, recently orphaned young man fascinated with guns and killing animals with a history of "disturbing" social media posts and who had been expelled from Douglas for fighting and carrying bullets in his backpack.

Broward County Sheriff Scott Israel said Friday his agency received about 20 calls for service "over the last few years" about Cruz ─ communications involving someone talking to a dispatcher about him, but not necessarily in regard to a crime or requiring any further action by police.

And a YouTube user in Mississippi came forward to say that he reported to the FBI a comment left on one of his videos by a person who called himself "nikolas cruz" who wrote, "Im going to be a professional school shooter."

The FBI responded to that September tip by interviewing the YouTube user the day after he reported the comment but was not able to identify the person behind it, Robert Lasky, the special agent in charge of the Miami office, said Thursday.

There was no indication the gunman had an accomplice or accomplices, federal and local authorities told NBC News.

Corky Siemaszko reported from Parkland, Florida, Michael Kosnar from Washington and Jon Schuppe from New York.