Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The teen gunman accused of opening fire with a semi-automatic rifle at his former high school in Parkland, Florida, has been charged with 17 counts of premeditated murder, officials said Thursday.

Authorities said the suspect, identified as 19-year-old Nikolas Cruz, concealed himself in the crowd fleeing Marjory Stoneman Douglas High School following the massacre on Wednesday afternoon. He was arrested in nearby Coral Springs.

Related: These are the 17 victims of the Parkland school shooting

Fourteen others were wounded, five with life-threatening injuries, hospital officials said.

Cruz had recently been expelled from Douglas for disciplinary reasons and was enrolled elsewhere in the district, the schools superintendent in Broward County, Robert Runcie, said. Cruz took an Uber to the Douglas campus on Wednesday, Runcie told NBC News.

What We Know:

17 people were killed and another 14 were wounded.

Suspect identified as Nikolas Cruz, who has been charged with 17 counts of premeditated murder. He may appear in court Thursday.

Cruz, 19, was believed to have used an AR-15 style semi-automatic rifle.

Broward County Sheriff's Office set to hold a news conference at 10:30 a.m. ET Thursday.

A YouTube user named "Nikolas Cruz" reportedly posted "I'm going to be a professional school shooter" on the site.

President Donald Trump has tweeted that there were "many signs the Florida shooter was mentally disturbed." He will address the nation at 11 a.m. ET.

The gunman was believed to have been armed with an AR-15-style semi-automatic rifle and multiple magazines, said Broward County Sheriff Scott Israel. It was unclear whether he had any other weapons, Israel said.

There was no indication that the gunman had an accomplice or accomplices, federal and local authorities said.

Cruz was taken into custody off campus about an hour after he "committed this horrific, detestable act," said Israel, who added investigators were reviewing social media postings that he described as "very disturbing." The suspect was treated for "labored breathing" as a precaution but was later released from the hospital, according to officials.

"You come to the conclusion this is just absolutely pure evil," said Florida Gov. Rick Scott, his hands clutched over his chest.

The FBI was alerted six months ago after a YouTube user named "Nikolas Cruz" posted a comment stating "I'm going to be a professional school shooter" on the video site, BuzzFeed reported early Thursday.

Cruz's mother died in early November and he had been staying with a local family — whose son is a junior at Douglas, the family's attorney told NBC Miami.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"He lived here without any concerns or issues for almost three months, and they are shocked and horrified by the allegations being made," the lawyer, Jim Lewis, said, adding that his clients are fully cooperating with investigators.

Related: Florida shooting leaves families distraught

The general store chain Dollar Tree confirmed that Cruz had worked at its Parkland branch.

The gunfire began outside the school and continued inside, where 12 of the victims were killed, Israel said.

All of those victims have been identified, he said, but no identities will be made public until the families have been notified.

Brandon Minoff, a senior at the school who said he had two classes with Cruz two years ago, said that while it was "surreal" to hear Cruz named as the suspect, "I wasn't surprised."

"I got paired with him for a project, and he started talking to me about his life — how he was held back twice, expelled from two private schools. He likes to do reckless stuff," Minoff said.

"He had aspirations to join the military," Minoff said. "He enjoyed hunting."

Sebastian Toala, another senior, told NBC Miami: "I never really got close to him, because I always had a feeling there was something wrong."

Mugshot of Nikolas Cruz. Broward County Sheriff's Office

Parkland, in north Broward County, is about 30 miles northwest of Fort Lauderdale. The shooting on the sprawling campus happened despite the presence of police officers at the school.

Runcie, the school superintendent, said at least two police cars were typically on campus "on a daily basis."

While students filed out of the school with their hands up, heavily armed SWAT team members conducted a class-by-class search to make sure there were "no other shooters" — and to retrieve any bodies, he said.

"This is a terrible day for Broward County, the state of Florida, the United States," Israel said. "There really are no words."

The first sign that something awful was happening Wednesday came around 2:30 p.m., not long before classes were supposed to have been dismissed, when authorities were called to respond to an active shooter.

For more than an hour, the school was at the mercy of a gunman on the loose.

"He was outside and inside the school," Israel said.

Just after 4 p.m., the Broward County Sheriff's Office announced on Twitter that the suspect had been apprehended. Not long after, stunned survivors began sharing their accounts of what happened.

Several students told NBC News that the school had gone through a fire drill earlier in the day. They said the fire alarm sounded again just before the shots were heard.

Relieved parents like Lisette Rozenblet, whose daughter attends the school, also said she was told that a fire alarm was pulled about the time the shots began. But her daughter's teacher, sensing that it might be a trap, told the students to stay in the classroom, she said.

"Her biggest fear is a school shooting," Rozenblet said of her daughter. "She is always begging me to be home-schooled because she was scared of this."

Joel Leffler, whose son and daughter attend the school, said both of his kids were safe — but in shock.

"My son called me as it was unfolding, running. He had to jump a fence," Leffler said. "My son heard around eight gun shots as he was running out."

When he reached his daughter by phone, she was whispering, he said.

"My daughter, who was there in the freshman hall where the shooting took place — she's in shock right now, and she's being taken out by SWAT," Leffler said. "She saw multiple dead bodies."

Parents wait for news after reports of a shooting at Marjory Stoneman Douglas High School in Parkland, Florida, on Wednesday. Joel Auerbach / AP

President Donald Trump tweeted Thursday that there were "many signs the Florida shooter was mentally disturbed." He was scheduled to address the nation Thursday at 11 a.m. ET.

Scott, a Republican whom the National Rifle Association's Political Victory Fund gave an "A+" rating, didn't directly answer reporters' questions Wednesday about how the gunman was able to obtain a semi-automatic rifle.

"There is a time to continue to have these conversations about how, through law enforcement, how through mental illness funding, to keep people safe, and we'll continue to do that," the governor said.