MILFORD, Mass. – Milford High School teacher Amy Allegrezza is used to doing school safety drills, but this one was different.

For one thing, she heard the sounds of real gunshots coming from a police officer running down hallways firing blanks from a .38-caliber handgun.

And, instead of simply practicing the school’s traditional, stay-in-place lockdown, Allegrezza and more than 500 other teachers, administrators, cafeteria and school custodians on Friday were told to consider new options, including breaking windows to escape, running zigzag through the school parking lot and, as a last resort, fighting back if the intruder makes it into their classroom.

“That was something to get us thinking. It got my heart racing – definitely,” said Allegrezza, who led about two dozen other teachers and school employees during one practice scenario in her classroom, as the sounds of gunshots rang out in the hallway. She ordered them to barricade the classroom doors with filing cabinets, pull down the blinds and keep quiet.

In another scenario acted out in the school cafeteria, the 500 participants ran in all different directions when the sounds of gunshots thundered just outside the room. Most ran outside through the cafeteria’s four doors, while about two dozen people fled through a side door into an adjoining teachers’ lounge, then barricaded the doors with long tables and chairs. One woman rolled her body over a lunch table in a mad scramble to get out of the cafeteria.

School Superintendent Robert Tremblay said he decided to expand the school staff’s safety training after a gunman killed 20 children and six educators at Sandy Hook Elementary School in Newtown, Conn., in December.

“Staying in place and hiding under a desk may not be the best solution at all. The best solution may be to get out,” Tremblay said.

The training, given to school employees during professional development time, was conducted by Synergy Solutions Inc., a Franklin-based company that offers active shooter and incident management workshops to law enforcement and other groups.

Jay Brennan, the company’s co-founder and a police sergeant in Medway, said the program advocates fighting back only as a last resort.

“If you are confronted with an aggressor, he’s coming into your room, you may have to take action,” he told the group.

“Study your surroundings for a possible weapon.”