FORT LAUDERDALE, Fla. – The suspect in a mass shooting at Marjory Stoneman Douglas High School told investigators that he heard voices in his head, giving him instructions on how to conduct the attack, law enforcement sources told ABC News.
Nikolas Cruz, 19, was arrested after he confessed to "shooting students that he saw in the hallways and on the school grounds" Wednesday, according to a probable cause affidavit.
Cruz faces 17 counts of premeditated murder and is being held without bond.
The voices that Cruz heard were described as "demons" by law enforcement sources, ABC News reported.
Broward County Sheriff Scott Israel said Nikolas Cruz fired into five classrooms.
The sheriff said Cruz, who was a former student at the school, used an AR-15 rifle in the shooting and was equipped with multiple magazines.
According to the affidavit, Cruz purchased the rifle in February 2017.
Israel said Cruz was dropped off at the school by the Uber driver at 2:19 p.m. The sheriff said Cruz entered an east stairwell in building 12 and began shooting into classrooms. One person was also shot on a stairwell, Israel said.
The sheriff said Cruz crossed a field and ran with other students who were fleeing the school, blending into the crowd.
Cruz walked to a nearby Walmart where he got a drink at Subway and then went to a McDonald's, where he sat down for a short time, Israel said.
The sheriff said Cruz was taken into custody at 3:41 p.m. in the Wyndam Lakes neighborhood by a Coconut Creek police officer.
According to the affidavit, Cruz hid the additional loaded magazines in a backpack until he got on campus to begin the assault.
"He's a broken human being," defense attorney Melisa McNeil told reporters after court. "He's a broken child."
McNeil said Cruz's mother recently died and he fell through the cracks.
She said she feels horrible for the families broken by the shooting.
"Mr. Cruz feels that pain," she said.
More than a dozen other people were taken to area hospitals after the shooting. Seven patients still remained hospitalized Friday morning.
Robert Lasky, FBI Special Agent in Charge of the Miami Division, said Thursday that the FBI received information last year about a school threat made on a YouTube comment.
"The comment simply said, 'I'm going to be a professional school shooter,'" Lasky said. "No other information was included with that comment, which would indicate a time, location or true identity of the person who made that comment."
Lasky said the FBI was unable to identify who made the remark.
Alaina Petty, a student at Marjory Stoneman Douglas High School, was killed in the Feb. 14 shooting at the school in Parkland.
The shooting is the 18th at a school in the U.S. so far in 2018.
Sen. Bill Nelson, D-Fla., toured the school Friday and spoke to reporters about what Congress can do to enact change.
"Maybe this will be the turning point," Nelson said. "Maybe the students speaking out so boldly as they have on national TV, maybe the parents crying out and speaking so boldly as they have, that maybe this will be the turning point because, in fact, enough is enough."
Israel said there was one school resource officer on campus at the time of the shooting, but the officer was in a different building than where the shooting happened and never encountered the suspect.
Marjory Stoneman Douglas High School is closed for the rest of the week. Broward County Public Schools Superintendent Robert Runcie said the school district would spend the next few days discussing a path toward reopening the school.
Cruz's next court date has not yet been set.