PARKLAND, Fla. (Reuters) - The Federal Bureau of Investigation said on Friday it had failed to act on a tip warning that the man now accused of killing 17 people at a Florida high school possessed a gun, the desire to kill and the potential to commit a school shooting.

The disclosure sparked angry disbelief from residents of the Miami suburb of Parkland still reeling from Wednesday’s massacre, the deadliest shooting ever at a U.S. high school, and led Florida’s governor to call for the FBI chief to resign.

A person described as someone close to accused gunman Nikolas Cruz, 19, called an FBI tip line on Jan. 5, weeks before the shooting at Marjory Stoneman Douglas High School, to report concerns about him, the Federal Bureau of Investigation said in a statement.

“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,” it said.

That information should have been forwarded to the FBI’s Miami field office for further investigation, but “we have determined that these protocols were not followed,” the agency said.

U.S. Attorney General Jeff Sessions said he has ordered a review of FBI procedures following the shooting, carried out by a gunman armed with an AR-15-style assault rifle and numerous ammunition cartridges.

“We have spoken with victims and families, and deeply regret the additional pain this causes all those affected by this horrific tragedy,” FBI Director Christopher Wray said in a statement.

The mishandled information followed a tip to the FBI in September about a YouTube comment in which a person named Nikolas Cruz said, “I’m going to be a professional school shooter.” The FBI said it investigated that comment but was unable to trace its origins, closing the inquiry until Cruz surfaced in connection with Wednesday’s mass shooting.

The FBI’s lapse regarding the Jan. 5 tip was met with anger in Florida after U.S. President Donald Trump made remarks seeming to chastise local residents for failing to alert authorities to Cruz’s sometimes erratic and violent behavior prior to Wednesday’s shooting rampage.

Cruz has been charged with 17 counts of premeditated murder.

Florida Governor Rick Scott said Wray, appointed to head the FBI by Trump last year after the president fired James Comey, should step down over the agency’s blunder.

“The FBI’s failure to take action against this killer is unacceptable,” Scott, a Republican, said in a statement. “We constantly promote ‘See something, say something,’ and a courageous person did just that to the FBI. And the FBI failed to act.”

The FBI separately has been criticized by some Republicans over its investigation of issues relating to Russia and the 2016 presidential election.

At the funeral on Friday for massacre victim Meadow Pollack, an 18-year-old senior, family friend Jeff Richman expressed dismay at the FBI’s failure.

“The FBI apologized? Tell that to families,” said Richman, 53, an advertising executive who lives in Parkland.

Broward County’s chief public defender, Howard Finkelstein, was quoted by the South Florida Sun Sentinel newspaper as saying that Cruz’s legal team planned to meet with prosecutors to offer a guilty plea in exchange for a life prison term.

“There is only one question: ‘Should this young man live or die by execution?’” Finkelstein told the Sun Sentinel. “We believe it’s in nobody’s best interest to go through a circus of a trial.”

Slideshow ( 29 images )

The public defender’s office could not immediately be reached by Reuters for comment.

“KIDS DON’T NEED GUNS”

The massacre has raised concerns about potential lapses in school security and stirred the ongoing U.S. debate pitting proponents of tougher restrictions on firearms against advocates for gun rights, which are protected by the U.S. Constitution’s Second Amendment.

Authorities acknowledged that the tips to the FBI were not the only indications that Cruz was troubled.

Slideshow ( 29 images )

Broward County Sheriff Scott Israel told a news conference his office had received about 20 “calls for service” in the last few years regarding Cruz and would scrutinize all of them to see if they were handled properly.

Israel indicated law enforcement should not be held responsible for Wednesday’s tragedy. “The only one to blame for this killing is the killer himself,” he said.

Some political leaders including Trump have said mental illness prompted the shooting. Cruz had been expelled for undisclosed disciplinary reasons from the school where the attack occurred. Former classmates have described him as a social outcast trouble-maker with a fascination for weaponry.

Some relatives and friends of shooting victims blamed Florida’s lenient gun laws, which allow an 18-year-old to buy an assault rifle. Outside a vigil on Friday, a sign read: “Kids don’t need guns. No guns under 21.”

The outpouring of grief was reflected in a multitude of prayer services and vigils on Friday - a total of six at various places of worship in and around Parkland. Funerals for at least two victims were also held.

Late in the day, the Republican president and first lady Melania Trump visited a hospital where survivors from the shooting were treated, meeting privately with victims and medical staff.

“The job they’ve done is incredible and I want to congratulate you,” the president said as he shook one doctor’s hand in front of reporters afterward. Trump did not respond when asked if the nation’s gun laws needed to be changed, then walked into another room.

He later appeared at the Broward County Sheriff’s Office, along with the governor and other politicians, offering praise to first responders for the “great job you’ve done.”

The vice mayor of Broward County, a strongly Democratic area, earlier blasted any visit by Trump, saying Republicans had failed to back common-sense gun laws and rolled back measures restricting severely mentally ill people from buying weapons.