The Florida Senate passed a school-security bill with a provision allowing teachers to be armed, despite strong opposition from teacher groups and students.

The measure is aimed at implementing recommendations by a state commission created in the wake of the shooting at Marjory Stoneman Douglas High School in Parkland, Fla., last year that left 17 people dead. It builds on a law passed last year that included new gun restrictions, including raising the minimum age to buy a firearm, and a guardian program that permitted the...