Florida state legislators have passed the first gun control bill since the Parkland school shooting that killed 17 people last month, but failed to ban the assault-style rifles police say were used in the massacre.

The bill, called the Marjory Stoneman Douglas High School Public Safety Act, raises the minimum age for buying assault rifles from 18 to 21, institutes a three-day waiting period for all firearm purchases, and bans so-called "bump stocks" that allow shooters to fire faster.

But the bill fails to address a major demand from Marjory Stoneman Douglas student activists, who have mobilised in favour of gun control since the shooting: a ban on military-style assault rifles like the one police say was used by shooting suspect Nikolas Cruz.

Parkland shooting survivors and other gun control advocates say the semi-automatic weapons are too dangerous to be available to the public. The National Rifle Association (NRA), however, has strongly opposed such a ban, and critics say the language is too broad.

One senator, Democrat Oscar Braynon, suggested an amendment narrowing the ban exclusively to AR-15 rifles – the exact weapon used in the Parkland shooting, as well as mass shootings in Las Vegas and Newtown, Connecticut. His amendment failed to pass.

Florida shooting – in pictures Show all 10 1 /10 Florida shooting – in pictures Florida shooting – in pictures Police arrest a suspect in connection with the shooting at the Marjory Stoneman Douglas High School in Parkland, Florida Reuters Florida shooting – in pictures Parents wait for news after reports of a shooting at Marjory Stoneman Douglas High School in Parkland, Florida AP Florida shooting – in pictures Anxious family members wait for news of students AP Photo/Wilfredo Lee Florida shooting – in pictures Students being evacuated from the school AP Florida shooting – in pictures Students being evacuated from the school Getty Florida shooting – in pictures People gather waiting for word from students AP Florida shooting – in pictures Parents waiting for news on their children AP Florida shooting – in pictures People gather at a hotel where students were taken after the shooting Getty Florida shooting – in pictures Florida Governor Rick Scott speaks to the media as he visits Marjory Stoneman Douglas High School following the shooting AFP/Getty Florida shooting – in pictures Dr. Igor Nichiporenko, Medical Director Trauma, left, and Dr. Evan Boyer, Medical Director, Emergency Services, speak about treating victims and the suspect at a press conference outside Broward Health North hospital AP

The bill also contains a controversial provision allowing some public school employees to carry weapons on campus – a policy championed by President Donald Trump in the wake of the Parkland shooting. The bill creates a $67m “marshall” programme to train and arm certain school employees to serve as “guardians”.

Counsellors, coaches and librarians could be armed under the programme, but – contrary to Mr Trump’s proposal – full-time teachers would not be eligible. The programme is voluntary, and all applicants must pass a mental health screening and obtain a concealed carry permit.

Detractors have said arming employees is dangerous – especially for students of colour, who are disproportionately likely to be disciplined by staff members.

Donald Trump says teacher could have 'shot the hell out of' Florida school shooter

Despite their misgivings, however, several Democrats said they decide to vote in favour of the bill because of a letter issued by the families of all 17 shooting victims this week.

“You must act to prevent mass murder from ever occurring again at any school,” the letter said. “This issue cannot wait. The moment to pass this bill is now.”

The bill passed the House with 67 votes in support and 50 opposed, just hours after Mr Cruz was indicted on 17 counts of premeditated first-degree murder and 17 counts of attempted first-degree murder. The bill now goes to Governor Rick Scott to be signed into law.

After the bill passed on Wednesday, legislators stood to applaud Andrew Pollack, whose daughter Meadow died in the shooting, and who sat through the entire House debate and vote.

"More needs to be done, and it's important for the country to be united in the same way the 17 families united in support of this bill,” Mr Pollack said after the bill passed.