A Florida commission investigating the February shooting deaths of 17 people at a high school in Parkland said in a starkly worded report that security at public schools must be improved and recommended arming teachers and spending more on mental health programs.

The Marjory Stoneman Douglas High School Public Safety Commission — established by the Florida Legislature after the Parkland shooting last year, with members appointed by state leaders — this week offered a detailed timeline of the shootings and was highly critical of Broward County sheriff’s deputies who did not enter the building.

It slammed Broward County Sheriff Scott Israel, saying he was partly to blame because he had changed active shooter policy to say that ­deputies “may” enter a building to engage a shooter, indicating it wasn’t necessary. Israel has changed the policy again. The report also noted that some sheriff’s deputies said they could not remember the last time they underwent training for an active shooter.

And the report was critical of the school security program operated by Broward County Public Schools. The report said it failed to stop the alleged shooter, Nikolas Cruz, a former student with a history of disciplinary problems and mental health concerns, from entering the school Feb. 14 with a semiautomatic rifle and killing 14 students and three staff members. Neither the school nor the district had a clear plan to lock down classrooms. It took several minutes for that to happen, leaving students, teachers and staff members “vulnerable to being shot,” it said.

The 15-member commission included sheriffs from several counties, including Pinellas County Sheriff Bob Gualtieri, who served as chairman. The fathers of three students killed were also appointed. The report will be sent to the Florida Legislature and governor. The panel interviewed hundreds of witnesses and reviewed “a massive amount of evidence,” it said.

Perhaps the most controversial recommendation among dozens called for training and giving weapons to teachers willing to carry arms. It is not clear how that will be received by administrators, teachers, students and parents. Some of the student survivors have become leaders in a national youth gun-control movement, and the Broward County school board voted in April not to accept state money appropriated for that purpose.

The Sun Sentinel quoted Broward County school board member Lori Alhadeff, whose daughter Alyssa was killed in the shooting: “Teachers went to school to teach. That is their expertise. Law enforcement, their expertise is supposed to be to engage a threat. Unfortunately, that didn’t happen on 2/14, but I still think we should leave it in the hands of law enforcement.”