Updated at 7 p.m. ET
Court documents say the suspect in the shootings at a South Florida high school has confessed to investigators. Nikolas Cruz, 19, has been booked on 17 charges of premeditated murder at Broward County's Main Jail in Fort Lauderdale, Fla.
According to a court filing, "In a post-Miranda statement, Cruz stated that he was the gunman who entered the school campus armed with a AR-15 and began shooting students he saw in the hallways and on the school grounds. Cruz stated that he brought additional loaded magazines to the school campus and kept them hidden in a back pack until he got on campus to begin his assault."
Cruz made his court appearance less than a day after the shootings at Marjory Stoneman Douglas High School, in Parkland, which killed at least 17 people and wounded 15 more.
Cruz allegedly fired on unarmed students and teachers at the high school in Parkland, Fla., which had expelled him for disciplinary reasons.
In a late-afternoon news conference, Broward Sheriff Scott Israel gave a timeline of Wednesday's events. He said that the shooter arrived at the school at 2:19 p.m., and that within two minutes, he began firing into several classrooms. After conducting attacks on the first and second floors, the shooter dropped his rifle on the third floor and ran away by mixing in among the crowd of students fleeing the scene.
Israel said the gunman visited a nearby Walmart and McDonald's before he was apprehended without incident.
Within an hour, Cruz was in custody, captured by law enforcement off campus.
The sheriff said the shooter arrived at the school by an Uber car, but he said the driver isn't suspected of being complicit in the shooting.
Peter Forcelli, the special agent in charge for the Bureau of Alcohol, Tobacco, Firearms and Explosives, said that the rifle used in the shooting was legally purchased about a year ago by the shooter.
SWAT teams were on the scene soon after the shooting began, evacuating students from the building. After Cruz was arrested away from the school's premises, he was taken to a hospital for treatment before being released to police custody.
He faced a judge in court briefly Thursday, and bond was denied.
Parents and classmates are left to cope with the aftermath.
"No child, no teacher, should ever be in danger in an American school," President Trump said in a televised speech to the country Thursday morning. "No parent should ever have to fear for their sons and daughters when they kiss them goodbye in the morning."
"Law enforcement will do everything we can — the FBI, ourselves — to make sure that this person is convicted of all charges and that justice is served," Israel said Thursday.
Authorities said Cruz began the attack outdoors toward the end of the school day, just as the school's some 3,200 students were leaving their classrooms.
"This particular individual came onto campus at the time of dismissal," Broward Superintendent Robert Runcie told reporters, "and that is a fairly open time for the campus."
The shooter then worked his way indoors using using an AR-15 semi-automatic rifle and what Israel described as "countless magazines," smoke grenades and a gas mask. Then, the fire alarm sounded — which "seemed odd," NPR's Greg Allen reports, "because there had already been a fire alarm that day."
Greg explains what happened next:
"Soon teachers and students got the word: It was a code red. There was an active shooter in the school. In some classrooms, teachers made sure their doors were locked, lights turned off and students hidden in closets or under the desks."But thinking it was a drill, one student interviewed on television says, her teacher led them out of the classroom before recognizing the danger. As he got them back into the classroom, she said, he was shot and killed."
"It was pretty chaotic, to be honest," Broward County Mayor Beam Furr told Morning Edition on Thursday. "There were policemen from every one of our cities — we have 31 cities in Broward County, and I believe every force from the county was there. And as I arrived [yesterday] the kids were coming out, and the parents were beside themselves hoping to see their kids."
The wounded were taken to three hospitals in the area. Representatives of two of those hospitals, speaking at Thursday's news conference, said five patients remained in their care at midday.
Among the 17 victims were the school's athletic director, Chris Hixon, and assistant football coach Aaron Feis. The Douglas football program tweeted that Feis, who was an alumnus of the school, "selflessly shielded students from the shooter when he was shot."
"He died a hero," the team said, "and he will forever be in our hearts and memories."
Authorities say they have notified the victims' families.
Furr is not only the mayor of the county, but he also worked as a teacher in the local school district. He said the rampage Wednesday called to mind some of the kids he had taught in the classroom.
"You keep your eyes on those kids who become disconnected — you know, they're out on the fringes. And as a teacher, you try to bring them into the fold, so to speak, in one way or another," he said. "It's part of our mission to make sure that kids become part of the overall community — and when one gets away, it's just sad."
Accounts from some of the school's teachers and parents have revealed a record of troubled behavior from Cruz, including at least one incident of bullying, a fixation on firearms, and actions that had so alarmed faculty that, a former math teacher of Cruz said, staff had been warned not to allow him back on campus. Furr also told Morning Edition that the suspect had been a client at mental health facilities and had been expelled from the high school for disciplinary reasons.
Still, it remains unclear how many red flags authorities saw.
"In 2017, the FBI received information about a comment made on a YouTube channel," Robert Lasky, FBI special agent in charge, noted at the news conference. "The comment simply said, 'I'm going to be a professional school shooter.' "
"Who would leave a comment like that?" said Ben Bennight, a bail bondsman in Mississippi, who told NPR that the comment was left on a YouTube video he had posted about the bail bond industry. He says he alerted the FBI, and agents later came to his office to ask him about it, though he had little information to offer because he "didn't know anything about the individual."
"I didn't hear anything else about it until yesterday, when they called and asked to meet with me," Bennight said.
"No other information was included with that comment which would indicate a time, location or the true identity of the person who made the comment," Lasky said at the news conference. "The FBI conducted database reviews, checks, but was unable to further identify the person who actually made comment."
Florida Republican Gov. Rick Scott told reporters that the chief focus among officials is having "a real conversation" about both school safety and mental illness in the community.
"If somebody is mentally ill," Scott said, "he should not have access to a gun."
Runcie echoed Scott about supporting and treating the mentally ill and went a step further, saying, "Now is the time for this country to have a real conversation on sensible gun control laws."
Trump, for his part, did not mention guns or many specifics in his televised speech — but he said authorities plan to tackle issues surrounding mental health. He said he plans to travel to Parkland to meet with families and speak with local officials about how to better secure schools.
He said the country "grieves with those who have lost loved ones in the shooting," in a statement released earlier Thursday. He also proclaimed that the American flag be flown at half-staff at the White House and public buildings throughout the U.S.
"We will take such action as we're able to take. We've got to reverse these trends we're seeing in these shootings," Attorney General Jeff Sessions told the Major County Sheriffs of America conference on Thursday.
"You and I know that we cannot arrest everybody that somebody thinks is dangerous," he added. "But I think we can and we must do better. We owe it to every one of those kids crying outside their school yesterday and those who never made it out of their school."
Copyright 2018 NPR. To see more, visit http://www.npr.org/.