Media playback is unsupported on your device Media caption Florida survivors on gun laws: 'Something has to change'

Pressure is mounting on the FBI over the agency's failure to act on a tip that Florida school shooting suspect Nikolas Cruz might carry out an attack.

Florida Governor Rick Scott said the agency's director must resign, while Attorney General Jeff Sessions ordered a review, lamenting FBI "failures".

Some of those close to the 17 victims of Wednesday's shooting also voiced dismay at the FBI's actions.

President Donald Trump on Friday met survivors of the attack in Parkland.

Mr Trump and First Lady Melania Trump visited a hospital and later the local sheriff's office, thanking them for their response to the tragedy.

"What a great job you've done," Mr Trump told law enforcement officials, adding: "I hope you get credit for it because believe me, you deserve it."

Media playback is unsupported on your device Media caption Inside the classroom: 'We watched gunman shoot our friends'

Nikolas Cruz, 19, has confessed to carrying out Wednesday's attack at Marjory Stoneman Douglas High School in Parkland and has been charged with 17 counts of murder.

It was the deadliest US school shooting since 2012 and has re-ignited debates about gun control, with many students from the school weighing in.

What triggered strong criticism of the FBI?

It comes after the Federal Bureau of Investigation admitted it did not properly follow up on a warning about Mr Cruz.

On 5 January a person close to the suspect contacted the FBI tipline to provide "information about Cruz's gun ownership, desire to kill people, erratic behaviour, and disturbing social media posts, as well as the potential of him conducting a school shooting", an FBI statement said.

The FBI said that information should have been assessed as a potential threat to life and passed on to the Miami field office but that "we have determined these protocols were not followed".

Media playback is unsupported on your device Media caption Chicago Cubs' Anthony Rizzo speaks at Florida shooting vigil

FBI Director Christopher Wray said the bureau was "still investigating the facts" and 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 added.

The 5 January tip was not the only information the FBI received about Nikolas Cruz.

In September, a Mississippi man reported to the law enforcement agency a disturbing comment left on a YouTube video by a user called "nikolas cruz" which said: "I'm going to be a professional school shooter."

Ben Bennight said he spoke to FBI representatives for about 20 minutes and that they contacted him again following the Parkland shooting.

The FBI on Thursday said they had conducted "checks" at the time, but were unable to identify the person behind the comment.

Questions are also being asked about how local police responded to concern about Nikolas Cruz.

Broward County Sheriff Scott Israel said his office had received 20 "calls for service" about him.

Each one would be scrutinised, he said, without going into detail about the nature of the calls.

What's being said about the FBI?

Governor Scott said in a statement that "the FBI's failure to take action against this killer is unacceptable".

He said that an apology would never give families "the answers they desperately need" and said that Mr Wray had 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," he said.

At a funeral for 18-year-old victim Meadow Pollack, Jeff Richman, a family friend, questioned the value of the FBI's apology.

"The FBI apologised? Tell that to families," he told Reuters news agency.

Meanwhile, Attorney General Jeff Sessions said that the FBI's "failures" had led to "tragic consequences", and announced a review at the justice department and FBI into how "indications of potential violence" are responded to.

The FBI has been criticised before for having been aware of a possible threat and then failing to thwart an attack:

The gunman of the 2009 mass shooting at Fort Hood in Texas was known to the FBI

The bureau had information about one of the two brothers behind the deadly Boston Marathon bombing in 2013

The gunman who killed 49 people in a gay club in Orlando, Florida, in 2016 was on the FBI's radar

In 2016, the FBI received about 1,300 tips a day through its website, which is staffed around the clock by two dozen people.

In addition to online tips, FBI field offices receive dozens of calls. About 100 of the tips are considered "actionable".

What do we know about the suspect?

Media playback is unsupported on your device Media caption Florida shooting suspect appears in court

Mr Cruz had been expelled from the school he has confessed to attacking and some students said they had previously joked he would one day "shoot up the school".

One former schoolmate, Chad Williams, said Mr Cruz was an "outcast" who was "crazy about guns".

His interest in weapons was apparent on his social media profiles, which the Broward County sheriff said were "very, very disturbing".

Mr Cruz had reportedly been treated for mental health issues at a clinic.