All police knew was that shots had been fired at the middle school.

What they didn’t know was that the shooter had a hostage on the second floor of the building.

The scenario was one of several played out Tuesday at Westbrook Middle School, where the Westbrook Police Department is holding training sessions all week. Officers from Westbrook and Gorham were invited to sign up for one of the half-day sessions.

On Tuesday afternoon, a team of four officers entered the side of the school and started up the stairs with their guns in the air. They heard a shot coming from the second floor. As they came through the double doors, the shooter and the hostage ran toward them, and police started firing paint ball-like ammunition, leaving colored stains on the shooter’s protective gear.

Rescue workers, who played “the bad guys” and the hostages, were also on scene to practice treating victims.

Led by Westbrook Sgt. Anthony Ciampi, a former member of a regional SWAT team in York County, the training is meant to prepare officers and rescue workers for any situation involving an armed suspect in a building. Westbrook Public Safety Director Michael Pardue said the department uses the school because it’s unoccupied in the summer.

“These types of situations can occur in any place,” he said.

Ciampi said, throughout the training session, the scenarios get more complex, with harder-to-find shooters and police officers getting shot.

He said the training scenarios elicit similar physical reactions in the officers as a real-life situation would.

“The longer they search, the more they get stressed,” Ciampi said.

Having rescue workers and Gorham police participate also helps create a more realistic scenario.

In real life, Pardue said, “we will all be dependent on one another to handle the situation.”