Florida governor Rick Scott has called on FBI director Christopher Wray to resign after learning that the bureau failed to investigate a tip-off that the Florida school suspect could be planning an attack.

Mr Scott sharply criticised the federal law enforcement agency, saying in a statement that the “FBI’s failure to take action against this killer is unacceptable”.

The FBI acknowledged it failed to act on a tip-off to its hotline that Nikolas Cruz had a “desire to kill”.

In a statement, Mr Scott said that “an apology will never bring these 17 Floridians back to life or comfort the families who are in pain.”

US senator Marco Rubio also criticised the FBI, saying it was “inexcusable” the bureau did not follow protocols. He said that Congress should launch its own investigations into what happened.

Earlier, it emerged a person close to Cruz called the FBI’s public tip-off line on January 5 and provided information about his guns and his erratic behaviour, including his expressed desire to kill people and his disturbing social media posts.

The caller was concerned that Cruz could attack a school.

The agency acknowledged that the tip-off should have been shared with the FBI’s Miami office and investigated, but it was not.

Nikolas Cruz in court (Susan Stocker/South Florida Sun-Sentinel via AP)
Nikolas Cruz in court (Susan Stocker/South Florida Sun-Sentinel via AP)

Mr Wray said the agency was still reviewing what went wrong.

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.

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

The FBI was also notified about a comment on a YouTube video posted by a “Nikolas Cruz” last year. It investigated the comment but did not determine who made it.

Cruz has been charged with killing 17 people at Marjory Stoneman Douglas High School in Parkland, north of Miami, on Wednesday.

People leave a funeral service for Alyssa Alhadeff at the Star of David Funeral Chapel (AP Photo/Brynn Anderson)
People leave a funeral service for Alyssa Alhadeff at the Star of David Funeral Chapel (AP Photo/Brynn Anderson)

Also on 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 football player as having “the strongest personality”.

She was also remembered as a creative writer with a memorable smile.

Details of the attack have 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 towards 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 — going back to spray bullets into two of the rooms a second time — then went upstairs and shot a single victim on the second floor.

He ran to the third floor, where according to 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.

Students are evacuated by police from Marjorie Stoneman Douglas High School after the massacre  (Mike Stocker/South Florida Sun-Sentinel via AP)
Students are evacuated by police from Marjorie Stoneman Douglas High School after the massacre (Mike Stocker/South Florida Sun-Sentinel via AP)

The shooting suspect excelled in an air-rifle marksmanship programme supported by a grant from the National Rifle Association Foundation.

It was part of a multi-million dollar effort by the pro-gun group to support youth shooting clubs.

Cruz was wearing a shirt with the logo of the Army Junior Reserve Officer Training Corps programme when he was arrested.

Former cadets told The Associated Press that Cruz was on the varsity marksmanship team that competed against other area schools.

The cadets used air rifles special-made for target shooting.

The JROTC programme at Cruz’s school received 10,827 dollars (£7,730) in non-cash assistance from the NRA’s foundation while he was there.

The NRA declined to comment. The foundation gave nearly 2.2 million dollars (£1.57 million) to schools in 2016.