A Marjory Stoneman Douglas High School teacher left a loaded gun in a public restroom and it was fired by someone, according to local police.

Parkland, Florida, chemistry teacher Sean Simpson left his loaded Glock 9mm handgun at a Deerfield Beach Pier bathroom, according to the Broward County Sheriff’s report. Mr Simpson had volunteered to arm himself while in the classroom in the wake of the 14 February mass shooting that killed 17 people at his school.

Mr Simpson said he left the gun there “by accident,” the Miami Herald reported. By the time Mr Simpson had returned to the bathroom to retrieve his weapon an inebriated man called Joseph Spataro had fired a bullet from the gun into the bathroom wall.

The Parkland teacher was able to grab the weapon from Mr Spataro, who was then charged with trespassing and firing a weapon while intoxicated. Mr Simpson was also arrested and charged with failure to safely store a firearm, which is a second-degree misdemeanour.

He has been released on $250 bond.

His arrest came just days before the Broward School Board rejected a proposal to arm teachers and other school staff, a move proposed nationally by President Donald Trump. Last month, Florida Governor Rick Scott signed a school safety bill that allows some school teachers to carry guns.

The $400m bill, written since the 14 February mass shooting, balances “our individual rights with need for public safety,” said Mr Scott. Neither the shooting survivors nor the powerful gun lobby organisation the National Rifle Association (NRA) are pleased with the bill, however.

11-year-old Naomi Wadler delivers amazing speech on gun violence at March For Our Lives protest

The legislation creates a so-called "guardian" program that enables teachers and other school employees in participating districts to carry handguns if they complete law enforcement training. The program will be up to local officials to implement and "if counties don't want to do this, they can simply say no," Mr Scott explained.

It also raises the minimum age to buy rifles from 18 to 21, extends a three-day waiting period for handgun purchases to include long guns, and bans bump stocks that allow guns to mimic fully automatic fire.

March for Our Lives – in pictures Show all 13 1 /13 March for Our Lives – in pictures March for Our Lives – in pictures Demonstrators chant during the protest for gun legislation and school safety AP March for Our Lives – in pictures Trevon ‘Tre’ Bosley, 19, of Chicago, the brother of Terrell Bosley who was killed in 2006 in a case of mistaken identity, speaks during the rally AP March for Our Lives – in pictures Marjory Stoneman Douglas High School student Delaney Tarr speaks at the rally AFP/Getty March for Our Lives – in pictures Protestors line the streets in Washington Getty Images March for Our Lives – in pictures People arrive for the March For Our Lives rally against gun violence in Washington, DC AFP/Getty March for Our Lives – in pictures Protestors carrying placards in Washington AFP/Getty March for Our Lives – in pictures Protestors hold up placards in Washington AFP/Getty March for Our Lives – in pictures Schoolchildren wear targets ahead of the rally Getty March for Our Lives – in pictures Attendees congregate in preparation for the march Getty March for Our Lives – in pictures Students brought a host of innovative placards AFP/Getty March for Our Lives – in pictures The movement’s main demand is the banning of assault rifles Getty March for Our Lives – in pictures Since the Florida shooting, students have called for urgent gun reform AFP/Getty March for Our Lives – in pictures In the wake of the Florida attack, President Donald Trump called for teachers to be armed AFP/Getty

The NRA, however, thinks even those limits are a sign of "bullying and coercion," as NRA and Unified Sportsmen of Florida lobbyist Marion Hammer said in a statement. The group felt the new limits restrict people's Second Amendment right to bear arms and a way to punish and demonise legal gun owners.

"Obviously, this is what we've been fighting for. It's nowhere near the long-term solution," said Chris Grady, a senior at Marjory Stoneman Douglas High School.

"It's a baby step, but a huge step at the same time. Florida hasn't passed any legislation like this in God knows how long. It's nowhere near what we want, but it's progress and uplifting to see," he said.

Parkland survivors have been out marching, taking politicians to task on social media, and speaking to the press in full force since the shooting, advocating for an assault weapons ban across the country, but particularly in Florida. The gunman, suspected to be former student Nikolas Cruz, used an AR-15 assault-style rifle. The bill would still allow the AR-15 to be sold in the state.