In the wake of numerous massacres on school grounds, many educational institutions — particularly colleges — have armed officers with high-powered weapons to defend against active campus shooters.

And now at least one public school district is following suit. The Douglas County School District in Colorado has purchased 10 semiautomatic rifles to arm its security officers, a district spokeswoman confirmed.

Director of security Richard Payne told the Denver Post that the Bushmaster “long guns” would be kept locked in patrol cars — “they will not be in the schools” — and issued to officers after they complete the same 20-hour course that commissioned police officers complete.

“They will only be deployed if there is a situation where they need to be deployed,” Payne said in a KDVR report.

He added: “Our main focus is to make sure that all of the students, staff, parents and community members are safe when they’re on any of our school properties.”

Eight armed security officers, all former law enforcement officers, work for the Douglas County School District, district spokeswoman Paula Hans told The Post. These officers, unlike the district’s 56 unarmed campus security officers, will receive the rifles after training.

Hans said Payne’s team trained with the Douglas County Sheriff’s Office in July 2015. “They recognized the sheriff’s deputies are often using long rifles during training, and that’s how the discussion began,” she said.

The school district is large, covering roughly 900-square miles, Hans said. “There may be an incident when our armed security patrol are the first to respond,” she said.

This isn’t the first time a public school police force has been armed with such weapons. In 2013, the Fontana Unified District in California armed its police officers with Colt, military-style semiautomatic rifles. The purchase, which was made before the mass shooting at Sandy Hook Elementary School in Newtown, Conn., drew criticism and sparked a debate about how far to go in the name of security.

And just like in Douglas County, Colo., the rifle purchase in Fontana was made without school board approval.

Other districts have taken similar steps. The Kingsburg Joint Union High School District in Kingsburg, Calif., approved a plan last week to allow its employees to carry concealed firearms on school property.

Officers armed with high-powered rifles may be more common on the nation’s college campuses. At least 100 college police departments have purchased assault rifles in the years after mass shootings at Virginia Tech and at Umpqua Community College in Oregon,  according to a report by the Associated Press.

The most popular version of the rifles now used by police, the AR-15, is a weapon issued to infantry troops across the military and is known for its long-range accuracy and devastating firepower. It also is a rifle that has been used by shooters such as Adam Lanza in Newtown, and is similar to the Bushmaster XM-15 that the Washington-area snipers used in their attacks in 2002.

“A bad shot with a rifle is better than a good shot with a handgun,” Skip Frost, former deputy chief of police at the University of Illinois at Urbana-Champaign, told the AP. Every officer at the university is offered a semi-automatic rifle.

In the vast majority of cases, campus police forces only deploy the rifles in so-called “active shooting situations,” when a person with a gun has been spotted in a school building. To qualify for the rifles, police must undergo additional training, including seminars offered by the FBI and U.S. Justice Department, the AP reported.

“The reality is that these are not always handgun situations,” FBI agent Katherine Schweit, who oversees the bureau’s active-shooter matters, told the AP. “We can’t tell a university realistically what’s acceptable in their community — that’s up to them — but we recognize the struggle that every community faces because many of these shooters come to the scene with a long gun.”

But using the newer rifles comes with added risk. The weapons use a more powerful projectile, which can penetrate brick walls and metal doors that separate classrooms, meaning that police officers must use discretion when firing the rifles in close quarters.

According to the AP, a 2012 survey by the U.S. Bureau of Justice Statistics found that 75 percent of college police departments carry weapons. Records released by the federal government also show that 91 campus police forces own 871 assault rifles secured through a program to loan military weapons to small law enforcement agencies throughout the country.

“You’re seeing across the United States this militarization of many college campuses,” Chelsea Canedy, a junior at Northeastern, told the AP.

Other documents the AP requested from top universities show that colleges occasionally make arms purchases directly from the manufacturers. Florida State bought 26 semi-automatic between 2012 and 2014 while the University of Illinois purchased 47 AR-15 rifles. The University of Wisconsin spent $17,000 on assault rifles between 2010 and 2014, the AP reported.

“As law enforcement, it’s our responsibility to be prepared for the worst-case scenario,” Frost told the AP. “If we can’t protect ourselves, we can’t protect the community.”

[This post has been updated.]