Alleged Florida school shooter Nikolas Cruz has admitted carrying out the attack that left 17 pupils and teachers dead and several more injured, according to police.

A sheriff’s department report detailing the 19-year-old’s confession came after he was charged with 17 counts of premeditated murder.

Cruz has appeared in court accused of shooting dead 14 pupils and three members of staff at Marjory Stoneman Douglas High School in Parkland on Wednesday, where he had studied before being expelled. The youngest victims were 14.

According to a Broward County Sheriff’s Office affidavit, he told investigators “he was the gunman who entered the school campus” and shot at students in hallways and elsewhere in the grounds, and that he had carried extra ammunition magazines in a backpack.

Sheriff Scott Israel said Cruz fired into five classrooms, four on the first floor and one on the second floor, before dropping the backpack and his AR-15 semi-automatic rife – purchased legally a year ago – and fleeing. He was able to blend in with students running away from the violence.

After the rampage, the gunman headed to a Wal-Mart store and bought a drink at a Subway restaurant before walking to a McDonald’s. He was arrested in the town of Coral Springs about 40 minutes after leaving the McDonald’s, the sheriff said.

Officer Michael Leonard of the Coconut Creek Police Department told reporters Cruz was taken in without incident. He recognised him from a description sent out over the radio, he added.

It was the US’ deadliest school attack since the assault on Sandy Hook Elementary School in Newtown, Connecticut, more than five years ago.

A timeline of the Parkland shooting released by Mr Israel said Cruz arrived at the school in an Uber at 2.19pm on Wednesday. Eight minutes later the massacre was over and he had fled. An armed officer stationed on campus never encountered Cruz during the attack, the sheriff’s office said.

The following day details emerged of what law enforcement officials called “very, very disturbing” social media posts Cruz had made.

Story continues

Images on his now-deleted Instagram profile showed him brandishing knives, rifle ammunition and a handgun, with others displaying a cache of weapons. A further post sought advice on buying a shotgun.

As details trickled out a YouTube user, BenTheBondsman, revealed he had reported to the FBI a comment under one of his previous videos that read: “Im going to be a professional school shooter”. The name of the commenter matched Cruz’s.

The agency confirmed it was aware of the report.

Other comments left by the same account included: “I whana shoot people with my AR-15”; ”I wanna die Fighting killing s**t ton of people”; and ”I am going to kill law enforcement one day they go after the good people”.

A spokeswoman told The Independent: “In September 2017, the FBI received information about a comment made on a YouTube channel.

“No other information was included in the comment which would indicate a particular time, location, or the true identity of the person who posted the comment.

“The FBI conducted database reviews and other checks, but was unable to further identify the person who posted the comment.”

Fellow students claimed they had joked about Cruz as a future killer, with one telling WFOR-TV: “A lot of kids threw jokes around saying that he was going to be the one to shoot up the school. It turns out that everyone predicted it.”

It had been reported that Cruz was linked with a white nationalist militia organisation called the Republic of Florida but police in Tallahassee, where the group is based, said they were aware of “no known ties” between them.

Lieutenant Grady Jordan, of the Leon County Sheriff’s Office, said he had “very solid” information on the group, whose leader had claimed that Cruz was a member and participated in paramilitary drills.

Lt Jordan said on Thursday his office had arrested militia leader Jordan Jereb at least four times since January 2014 and has been monitoring its membership.

The Southern Poverty Law Centre, which monitors hate groups, also could not confirm a link.

Cruz is an orphan and recently bereaved. His mother Lynda Cruz, who adopted him as an infant alongside his brother, died last November, and his father Roger had died a number of years earlier.

In court on Thursday his lawyer, public defender Melisa McNeill, called him a “broken human being” but said he was fully aware of what was taking place around him.

Cruz told investigators he heard “demon” voices in his head instructing him on how to conduct the massacre, according to an isolated report by ABC News, which cited anonymous law enforcement sources.

His mother sought counselling for him when he was younger, according to the Orlando Sentinel. Broward County mayor Beam Furr told CNN Cruz had received some mental health treatment but had not attended a clinic for more than a year.

Hunter Vukelich, 24, was Cruz’s manager at the Dollar Tree discount shop in Parkland until last month when Mr Vukelich changed jobs. He said Cruz became his employee in November, just after his mother died.

He described Cruz as an introvert, but one who showed no signs of potential violence. Cruz rode his bike to and from work, spent his breaks looking at his phone and would leave it to others to start conversations, Mr Vukelich said.

“He was a timid introvert. He didn’t bother anyone. He was cordial. He was nice. He was shy, timid, had some anxiety,” he told The Independent.

Brian Oakes, 40, who runs a dance studio next door to the shop, told this website he knew Cruz as someone who talked to himself on occasion but was otherwise fairly nice. “He just seemed like a normal person … He talked to himself.”

Additional reporting by agencies

Related Video: