In swift fashion, nine schools in two Greater Portland districts shut down this week in response to security threats.

In the Windham-Raymond district, all eight schools were shut down for three days after administrators received threatening emails allegedly sent Monday by a 16-year-old former student who was arrested Tuesday and now faces charges of terrorizing.

Police in Saco were still working Friday to determine who placed a call the day before that prompted school administrators to lock down Thornton Academy and then evacuate students. The school was kept closed Friday.

The incidents highlight some of the steps schools in Maine and across the country have taken to deal with a wide range of security issues, particularly since the December 2012 massacre of 26 students and teachers at Sandy Hook Elementary in Newtown, Connecticut.

More specifically, they highlight how vigilant schools have had to become in the face of threats, even those that might have seemed innocuous enough to ignore a generation ago.

Andrew Dolloff, superintendent of the Yarmouth School Department, said security drills, which include asking students to assemble away from windows and doors and remain silent, are now a way of life in school.

“I think ever since Columbine there has been a greater focus on school security,” he said, referring to the Colorado high school where 13 people were killed by a pair of shooters in 1999. “But Newtown, I think, really impacted schools around New England because it took away that belief that it won’t happen here. Newtown is so close and it’s similar to a lot of other New England towns.”

Michael Dorn, executive director of Georgia-based Safe Havens International, the nation’s largest school security consultant, said that in the post-Sandy Hook world, schools have often been driven more by fear and emotion than by research and logic. But Maine “has taken a lot better approach to safety than what we’ve seen around the country,” he said.

School officials in both Windham and Saco have declined to elaborate on the nature of the threats made against them, so Dorn said he could not speak to the specific incidents. However, he did say that lockdowns and extended school closures are becoming more common.

“You can no longer treat a threat as not credible,” he said.

In the case of Justin Woodbury, the Windham teenager charged in connection with email threats to two Windham-Raymond administrators, police have said the messages included references to weapons and expressions of anger, and that Woodbury took steps to make them difficult to trace.

Thornton Academy head of school Rene Menard has not elaborated on the threat made to his school. He did say Thursday that no students were at risk, but classes were still canceled Friday.

Dorn said all these increased security measures, while well-intentioned, can sometimes lead to problems.

For instance, lockdowns, when done improperly, can create fear and lead to poor response by teachers and students.

Students at both Windham High School and Thornton Academy acknowledged being scared when their respective schools were locked down.

Sadie Nelson and Julia Linevitch, both Windham juniors and members of the varsity basketball team, said they didn’t know what was happening on Monday.

“It was a real lockdown. I was in the library. No one was allowed out of their rooms,” Nelson said.

Added Linevitch: “I was really nervous when it was happening. I didn’t know if I walked out into the hall, there would be someone with a gun. I didn’t know what to expect.”

Sharon Corbeil, whose daughter is a freshman at Thornton Academy, got an unnerving text message on Thursday shortly after the lockdown. It read: “If I die, I love you.”

In both instances, the threats never materialized, but the schools had no choice but to treat them seriously.

“If there is any place to go it’s to err on the side of caution,” said Jeff Porter, superintendent of SAD 51 in Cumberland. “There was a time when school officials could say (the threat) is not credible and just let it go. That’s just no longer an option.”

State law requires school districts to have comprehensive plans to address emergencies ranging from shootings to bomb threats to natural disasters to fires. Local emergency responders must participate in the development of those plans.

Safety protocols vary depending on the school district, the type of school and, in some cases, the year a school was built. Newer schools tend to have more built-in safety measures.

Shortly after the Sandy Hook shootings, the Maine Department of Education sent an email to all school districts recommending that they update their security procedures.

Many installed more security cameras or double sets of locking doors or classroom doors that lock from the inside. Some used federal U.S. Department of Justice grants to conduct audits or pay for security upgrades.

Aside from infrastructure improvements, schools also now conduct regular lockdown and evacuation drills.

Dolloff said the drills have become much more sophisticated but that his students have responded well.

“Hopefully, we’re preparing them for something they don’t ever have to deal with,” he said. “But we’ll never be able to prepare for everything.”

Those safety precautions may have aided both Windham and Thornton Academy students and staff this week, according to Dorn, the safety consultant.

His firm has consulted for the Maine Department of Education on school security. In fact, Safe Havens delivered a report in April outlining a number of strategies that schools can employ, among them resisting the temptation to enact policies out of fear.

“In some cases, responses at schools are worse than they were before Sandy Hook, even though they have changed their processes,” he said. “A lot of that has to do with fear.”

He said fear often leads to feel-good measures such as installing bulletproof glass and keeping pepper spray in classrooms that create what he called a false sense of protection.

The other major downside to increased security is the sense that schools are no longer open and welcoming places. That’s something schools may never get back.

Porter, the Cumberland superintendent, acknowledged that making schools more secure has taken away the sense of community.

“We don’t want schools to be like prisons or forts,” he said. “But I think people understand the precautions.”

Staff Writers David Hench and Tom Chard contributed to this story.