A 19-year-old man has confessed to the shooting at a Florida high school that resulted in the deaths of at least 17 people, including students and adults, police say.

Nikolas Cruz "stated that he was the gunman who entered the school campus armed with an AR-15 and began shooting students that he saw in the hallways and on the school grounds", a police document, released after the shooting, reads.

The teenager was also charged with 17 counts of premeditated murder.

Police say Cruz, armed with a semiautomatic rifle, gas mask, "multiple magazines" of ammunition and smoke grenades, began his shooting rampage at the Marjory Stoneman Douglas High School in Parkland, Florida just before dismissal last week.

At least 17 people were killed and 15 others injured.

According to police documents, Cruz stated that "he brought additional loaded magazines to the school campus and kept them hidden in a backpack until he got on campus to begin his assault".

Police say the teen also admitted that he left the scene "as students began to flee the campus on foot" and he "decided a plan to discard the AR15 and vest with the additional magazines so he could blend into the crowd".

He was arrested "without incident" about an hour after the attack in a neighbouring town, police say.

Here's what we know so far about Nikolas Cruz: