PARKLAND, Fla. — The FBI received a tip last month that the suspect in the Florida school shooting had a "desire to kill" and access to guns and could be plotting an attack, but agents failed to investigate, the agency said Friday. Florida Gov. Rick Scott called for the FBI's director to resign because of the missteps.

Attorney General Jeff Sessions said the shooting that killed 17 people Wednesday was a "tragic consequence" of the FBI's failure and ordered a review of the Justice Department's processes. He said it's now clear that the nation's premier law enforcement agency missed warning signs.

In more evidence that there had been signs of trouble with the suspect, Broward County Sheriff Scott Israel said at a Friday news conference that his office had received more than 20 calls about Nikolas Cruz in the past few years.

A person close to Cruz called the FBI's tip line on Jan. 5 and provided information about Cruz's weapons and his erratic behavior, including his disturbing social media posts. The caller was concerned that Cruz could attack a school.

In a statement, the agency acknowledged that the tip should have been shared with the FBI's Miami office and investigated, but it was not. The startling admission came as the agency was already facing criticism for its treatment of a tip about a YouTube comment posted last year. The comment posted by a "Nikolas Cruz" said, "Im going to be a professional school shooter."

The FBI investigated the remark but did not determine who made it.

The 19-year-old Cruz has been charged with killing 17 people at Marjory Stoneman Douglas High School in Parkland, north of Miami.

FBI Director Christopher Wray said the agency, which received an average of 2,101 calls to the tip line each day in 2017, was still reviewing its missteps on the January tip. He said he was "committed to getting to the bottom of what happened," as well as assessing the way the FBI responds to information from the public.

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

Florida's governor sharply criticized the federal law enforcement agency Friday, calling the FBI's failure to take action "unacceptable."

"Seventeen innocent people are dead and acknowledging a mistake isn't going to cut it," Scott said. "... The families will spend a lifetime wondering how this could happen, and an apology will never give them the answers they desperately need."

The FBI is already under intense scrutiny for its actions in the early stages of the investigation into Russian meddling in the 2016 presidential campaign. President Donald Trump and some congressional Republicans have seized on what they see as signs of anti-Trump bias.

The president has repeatedly slammed the agency and its leaders, writing on Twitter that its reputation was in "tatters."

Also Friday, mourners gathered for the first funeral for a shooting victim, packing the Star of David chapel to remember 14-year-old Alyssa Alhadeff. From outside the chapel, other mourners strained to hear the voices chanting Jewish prayers and remembering the star soccer player as having "the strongest personality." She was also remembered as a creative writer with a memorable smile.

At a later funeral for 18-year-old Meadow Pollack, her father's angered boiled over. With more than 1,000 mourners including Scott packed into Temple K'ol Tikvah, Andrew Pollack looked down at the plain pine coffin of his daughter and yelled, "You killed my kid!" referring to Cruz.

A day earlier, details of Wednesday's attack emerged , showing how the assailant moved through the school in just minutes before escaping with the same students he had targeted.

Cruz jumped out of an Uber car and walked toward building 12 of the school, carrying a black duffel bag and a black backpack. He slipped into the building, entered a stairwell and extracted a rifle from his bag, authorities said. He shot into four rooms on the first floor then went upstairs and shot a single victim on the second floor.

He ran to the third floor, where according to a timeline released by the Broward County Sheriff's Office, three minutes passed before he dropped the rifle and backpack, ran back down the stairs and quickly blended in with panicked, fleeing students.

Florida State Sen. Bill Galvano, who visited the third floor, said authorities told him it appeared that Cruz tried to fire point-blank out the third-floor windows at students as they were leaving the school, but the high-impact windows did not shatter.

The sheriff clarified Friday that Cruz never had a gas mask or smoke grenades during the attack, but officers did find a balaclava. Israel said his office would be investigating every one of the previous calls about Cruz to see how they were handled.

Authorities have not described any specific motive, except to say that Cruz had been kicked out of the high school, which has about 3,000 students and serves an affluent suburb where the median home price is nearly $600,000. Students who knew him described a volatile teenager whose strange behavior had caused others to end friendships.

____

Lush reported from St. Petersburg, Florida. Associated Press Writer Sadie Gurman in Washington contributed to this report.

____

Follow the AP's complete coverage of the Florida school shooting here: https://apnews.com/tag/Floridaschoolshooting .