(CNN)A teacher at the Parkland, Florida, high school where 17 students and teachers were shot to death was arrested for allegedly leaving a loaded gun in a public bathroom.
A homeless man is accused of picking it up and firing it.
According to a Broward County Sheriff's report, Sean Simpson removed his 9mm Glock pistol while using the bathroom at the Deerfield Beach Pier on Sunday and forgot it in the stall when he left to wash his hands.
He realized his mistake less than five minutes later and heard a shot while he was walking to recover his weapon, the report said.
Simpson told deputies that he saw a man holding the gun when he walked into the bathroom and grabbed it out of his hand, the report said.
Simpson was charged with unsafe storage of a firearm because the gun could have been found by a child at the public beach.
Simpson told CNN affiliate WPLG that he could not comment on the criminal case, though he did say he did not believe it constituted a violation of school board rules. Simpson did not respond to a CNN request for comment.
"Safety and security remain the District's highest priorities," the Broward County School District said in a statement. "The District is aware of an incident, which occurred over the weekend at the Deerfield Beach Pier. At this juncture, no determination regarding employee discipline has been made, pending the final disposition of the charges."
Deputies said Joseph Spataro fired the gun to see if it was loaded. He was charged with discharging a firearm in a public or residential property and trespassing because he was told to leave the area several times in the past.
Spataro's attorney could not be reached for comment.
Simpson is a chemistry teacher at Marjory Stoneman Douglas High School and was there on February 14, when a former student opened fire in the school.
He also has a Florida concealed weapons permit.
In an interview with MSNBC after the shooting, Simpson said he might be willing to carry a gun to protect his students.
"I don't know if that's the answer, but I know that there are some of us that are willing to take the training if it was offered and probably be another line of defense, but again it's a complicated subject and I'm not sure if it's the answer," Simpson said. "I think it's easier to get these type weapons out of the hands of people that aren't meant to do anything but kill."
The Broward County School Board announced on Tuesday that it would not participate in program to arm teachers.