PARKLAND, Florida - An orphaned 19-year-old with a troubled past and an AR-15 rifle was charged with 17 counts of premeditated murder Thursday morning after being questioned for hours by state and federal authorities following the deadliest school shooting in the U.S. in five years.

Fifteen wounded survivors were hospitalized as bodies were recovered from inside and around Marjory Stoneman Douglas High School.

Nikolas Jacob Cruz was booked into the Broward County Jail early Thursday, still wearing the hospital gown he was given after being treated for labored breathing following his arrest. 

Just before gunfire broke out, some students at the school thought they were having another fire drill.

Such an exercise had forced them to leave their classrooms hours earlier. So when the alarm went off Wednesday afternoon shortly before they were to be dismissed, they once again filed out into the hallways.

That's when police say Cruz, equipped with a gas mask, smoke grenades and multiple magazines of ammunition, opened fire with a semi-automatic weapon, killing 17 people, injuring 15 and sending hundreds of students fleeing into the streets.

It was the nation's deadliest school shooting since a gunman attacked an elementary school in Newtown, Connecticut, more than five years ago.

A law enforcement source said the suspect appears to have pulled the school fire alarm, causing chaos, then started shooting, reports CBS News news senior investigative producer Pat Milton.

"Our district is in a tremendous state of grief and sorrow," said Robert Runcie, superintendent of the school district in Parkland, about an hour's drive north of Miami. "It is a horrible day for us."

Runcie said there will be grief counseling for students and victims' families beginning early Thursday. 

"We are going to pull through this as a community," Runcie said.

Authorities offered no immediate details about Cruz or his possible motive, except to say he'd been kicked out of the high school, which has about 3,000 students. Students who knew him described a volatile teenager whose strange behavior had caused others to end friendships with him.

Cruz's mother, Lynda Cruz, died of pneumonia on Nov. 1 neighbors, friends and family members said, according to the Sun Sentinel. Cruz and her husband, who died of a heart attack several years ago, adopted Nikolas and his biological brother, Zachary, after the couple moved from Long Island in New York to Broward County.

The boys were left in the care of a family friend after their mother died, family member Barbara Kumbatovich, of Long Island, said.

Unhappy there, Nikolas Cruz asked to move in with a friend's family in northwest Broward. The family agreed and Cruz moved in around Thanksgiving. According to the family's lawyer, who did not identify them, they knew that Cruz owned the AR-15 but made him keep it locked up in a cabinet. He did have the key, however.

Jim Lewis said the family is devastated and didn't see this coming. They are cooperating with authorities, he said.

Victoria Olvera, a 17-year-old junior at the school, said Cruz was expelled last school year because he got into a fight with his ex-girlfriend's new boyfriend. She said he had been abusive to his girlfriend.

"I think everyone had in their minds if anybody was going to do it, it was going to be him," she said.

Student Brandon Minoff told CBSN he had had classes with Cruz. Minoff described the suspect as a "strange kid."

Another student told CBS News about the suspect, "The kid was crazy. I had engineering with him a couple years ago and he wasn't allowed to come to school with a backpack and he would threaten students and break glass and get into fights so he got kicked out of school."

Broward County Sheriff Scott Israel said investigators were dissecting the suspect's social media posts.

"And some of the things that have come to mind are very, very disturbing," he added without elaborating.

Daniel Huerfano, a student who fled Wednesday's attack, said he recognized Cruz from an Instagram photo in which Cruz posed with a gun in front of his face. Huerfano recalled Cruz as a shy student and remembered seeing him walking around with his lunch bag.

"He was that weird kid that you see ... like a loner," he added.

Cruz was taken into custody without a fight about an hour after the shooting in a residential neighborhood about a mile away. He had multiple magazines of ammunition, authorities said.

"It's catastrophic. There really are no words," said Israel.

As of 9 p.m. ET, Israel said, 12 of the 17 people who lost their lives had been identified. Israel said authorities wouldn't release the names of the victims until all the families are notified. He said some of the students didn't have their backpacks or identification on them. 

Frantic parents rushed to the school to find SWAT team members and ambulances surrounding the huge campus and emergency workers who appeared to be treating the wounded on sidewalks. Students who hadn't run began leaving in a single-file line with their hands over their heads as officers urged them to evacuate quickly.

"We were in the corner, away from the windows," said freshman Max Charles, who said he heard five gunshots. "The teacher locked the door and turned off the light. I thought maybe I could die or something."

As he was leaving the building, he saw four dead students and one dead teacher. He said he was relieved when he finally found his mother.

"I was happy that I was alive," Max said. "She was crying when she saw me."

Noah Parness, a 17-year-old junior, said he and the other students calmly went outside to their fire-drill areas when he suddenly heard popping sounds.

"We saw a bunch of teachers running down the stairway, and then everybody shifted and broke into a sprint," Parness said. "I hopped a fence."

Most of the fatalities were inside the building, though some victims were found fatally shot outside, the sheriff said.

The scene was reminiscent of the Newtown attack, which shocked even a country numbed by the regularity of school shootings. The Dec. 14, 2012, assault at Sandy Hook Elementary School killed 26 people: 20 first-graders and six staff members. The 20-year-old gunman, who also fatally shot his mother in her bed, then killed himself.

Not long after Wednesday's attack in Florida, Michael Nembhard was sitting in his garage on a cul-de-sac when he saw a young man in a burgundy shirt walking down the street. In an instant, a police cruiser pulled up, and officers jumped out with guns drawn.

"All I heard was 'Get on the ground! Get on the ground!'" Nembhard said. He said Cruz did as he was told.

The school was to be closed for the rest of the week.

© 2018 CBS Interactive Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.