Chad Williams, 18, told Reuters news agency that Mr. Cruz was “crazy about guns” and would regularly set off the fire alarm before he was eventually expelled.

“He was kind of an outcast. He didn’t have many friends,” he said.

Maths teacher Jim Gard echoed the view that Mr. Cruz had a reputation for bad behavior.

“There were problems with him last year threatening students, and I guess he was asked to leave campus,” he told the Miami Herald.

He added that the school had sent out email warning teachers about Mr. Cruz’s threats.

Sen. Chris Murphy addresses Florida school shooting on Senate floor: "Let me just note once again for my colleagues…We are responsible for a level of mass atrocity that happens in this country with zero parallel anywhere else." https://t.co/BuEAqG21orpic.twitter.com/h2ODRP5g7N

‘Disturbing’ posts

Student Matthew Walker told ABC News that Mr. Cruz was known for posting pictures of weapons on social media.

“Everything he posts is about weapons. It’s sick,” he said.

These images have begun circulating on social media and are apparently taken from two separate Instagram accounts belonging to Mr. Cruz.

The accounts, which have since been deleted, include a number of images of knives and guns.

One picture shows a box of ammunition and another shows numerous rifles spread on a bed.

In several images, a masked man is shown holding up large knives to the camera.

Students were evacuated from the school during the attack / Getty Images

Broward County Sheriff Scott Israel said police had checked Mr. Cruz’s social media profiles, which he described as “disturbing”.

“We’ve already began to dissect his websites and the social media he was on and some of the things that have come to mind are very, very disturbing,” he said.

But despite multiple accounts of Mr. Cruz’s threatening behavior, officials say there had been no indication that the shooting would happen.

“We didn’t have any warnings, there weren’t any phone calls or threats that we know of, that were made,” Robert Runcie, Broward superintendent of schools, told reporters.

It's been 19 years since Columbine. 5 years since Newtown. The inaction in the wake of these tragedies has gotten us to 18 school shootings in the last 6 weeks. Kids are dying — we can't tolerate politics as usual anymore.