Police arrested the suspect, Nikolas Cruz, off school grounds without a struggle.
Broward County Sheriff Scott Israel said Cruz was armed with an AR-15 rifle and multiple magazines.
Israel told reporters he is “sick to his stomach” thinking how students who left their homes Wednesday morning with a backpack full of books and pencils are now dead or lying in a hospital bed.
Israel said 12 of the victims died inside the school. Three others were killed outside and two died of their wounds at a hospital.
He said the victims included students and adults, but has not publicly identified any of them yet.
Before heading to the hospital to meet with victims and their families, Florida Governor Rick Scott said he cannot imagine how their lives will be changed by this day.
He appeared to struggle for words before calling the shooting “pure evil.”
Florida Attorney General Pam Bondi said the state will pay for the funerals and counseling for the families. She warned scammers not to try to take advantage of those who want to help the families financially.
The FBI is on the scene and will take the lead in the investigation, working with police. It is urging anyone with video, pictures, or any other evidence to send it to an FBI website.
Marjory Stoneman Douglas High School is in Parkland, Florida, about 72 kilometers north of Miami.
Television pictures just after the shooting showed students streaming out of the school, many holding their hands high in the air to show they were unarmed.
Wednesday’s tragedy apparently came without warning. Students told television networks everything seemed normal inside the school when the fire alarm sounded. They said they heard gunshots while they were leaving the building, and a number of students ran back inside for cover while others fled to a nearby department store.
Video taken inside a classroom showed students crouched under desks, screaming in shock and terror while gunshots can clearly be heard. A computer screen with bullet holes could be seen.
Other students hid in closets, using their cellphones to text emergency messages to their parents.
One student told reporters that the suspect, Cruz, had a reputation in school of being “mentally unstable” and that he had threatened other students.
“He was definitely not the kind of person who should have been allowed to have a gun,” the student said.
President Donald Trump has offered Florida authorities all the federal help they need and tweeted his “prayers and condolences” to the victims and their families.
“No child, teacher or anyone else should ever feel unsafe in an American school,” he tweeted.
But Democratic Senator Chris Murphy of Connecticut blamed Congress for what he called a “scourge” of school shootings.
“It only happens here, not because of coincidence, not because of bad luck, but as a consequence of our inaction. We are responsible for a level of mass-atrocity that happens in this country with zero parallel anywhere else,” Murphy said.
Connecticut is home to Sandy Hook Elementary School in Newtown, where 20 elementary school children and six adults were massacred in a 2012 shooting.