Briar Woods High School, a half-hour drive from the CIA’s headquarters in Northern Virginia, might have provided an ideal training ground for the agency’s bomb-sniffing dogs. Its labyrinthine hallways and voluminous classrooms are home to something that can wreak havoc for the canines: polished floors, which cause dogs to slip and lose their focus as they hunt for explosives.

That was one reason the school, which educates nearly 1,700 students in Ashburn, played host to a CIA dog team for a training exercise while students were on spring break last week, according to the Loudoun County school system. But the choice to go to a public school for the quiet exercise has led to an only-in-Washington embarrassment for the elite spy agency, which left explosive material behind in the engine compartment of a school bus that then shuttled special-needs children for two days this week.

A mechanic discovered and removed the explosive putty — which county Supervisor Koran Saines (D-Sterling) said was the demolition explosive C-4 — during a routine bus maintenance check Wednesday. Until then, no one noticed that it was missing.

That the CIA was using live explosives and lost track of them in a place where children and teachers spend their days has raised concerns among parents about the use of a school facility for such kinds of law enforcement training. It also illuminates the fact that local authorities and school systems feel obliged to prepare for scenarios that once seemed unthinkable, such as gunmen firing at schoolchildren and bombs hidden on buses.

Loudoun County schools spokesman Wayde Byard described the material as “putty-like,” and the CIA said the material “is very stable and insensitive to physical shocks,” descriptions that are consistent with plastic explosives, which require special detonators to set off. Saines, who was briefed on the mishap Wednesday by county personnel, said county officials confirmed that it was C-4.

Dean Boyd, a CIA spokesman, said that the training team left behind “explosive material used as a training device for K-9s. This material is commonly used by federal, state and local law enforcement agencies to train K-9s in explosives detection.”

The agency “has taken immediate steps to strengthen inventory and control procedures in its K-9 program to prevent such incidents from happening again,” Boyd said, noting that the CIA has done a full inventory of explosive material used in the training program. “CIA is a part of the Northern Virginia community and we will do whatever it takes to prevent this from happening again.”

The CIA opened a center to train bomb-sniffing dogs for police departments and other agencies in the Washington region in December 2010, after the Bureau of Alcohol, Tobacco, Firearms and Explosives curtailed its program. Since then, the intelligence agency has trained dogs for the Fairfax County Police Department, the Loudoun County Sheriff’s Office, the Loudoun County Fire Marshal’s Office, the FBI and the National Geospatial-Intelligence Agency, according to the CIA and Loudoun officials. The sheriff’s office has been working with the CIA K-9 unit since 2012.

In addition to providing initial training courses, the CIA has organized recurring training for dogs, including the session at Briar Woods High. The county’s schools make their facilities available to law enforcement agencies for training; Byard said all law enforcement training in school facilities has been suspended pending a review of protocols.

Kraig Troxell, a spokesman for the Loudoun County Sheriff’s Office, said the office sent two dogs and their handlers to join the CIA team at the training. It was at least the second time this year that the CIA has done a dog-training exercise at Briar Woods High. Troxell said it is essential for dogs to train in scenarios they will encounter on the job. He said four county schools have been searched for explosives during the past year.

“Real-world training exercises enable law enforcement agencies across the country to prepare and test their personnel on how they respond to critical incidents such as terrorism, active-shooter incidents and other emergencies,” Troxell said. “In conducting training at these schools, we’re taking the opportunity to familiarize ourselves with the school so that when the call does come in to respond for operational reasons, whether it’s to a bomb threat or an active shooter, we can be as effective as possible in mitigating any possible threat to our kids and teachers.”

Since school attacks in Columbine, Colo., in Newtown, Conn., and at Virginia Tech, law enforcement and school security officers have worked together to drill for all sorts of potentially catastrophic events. Darrel Stephens, executive director of the Major Cities Chiefs Association, said it is a common practice for police departments to use school facilities to train for active-shooter situations.

“They normally will use them during the summer months when the children are out of school,” Stephens said. “This training does not involve the use of live ammunition or explosives. . . . It is to ensure that the training takes place in a safe environment.”

Experts and former CIA officials said it seemed highly unusual for the CIA to use live explosives in a school for a training exercise, and community members said it was stunning to learn that explosives would ever be present at a school.

School board member Debbie Rose (Algonkian) said she was “surprised” when she heard that the CIA accidentally left the explosives on a school bus and added that she did not know that the agency was using school grounds for training.

“We know, too, that preparation and training does save lives,” Rose said. “It’s an unfortunate reality of the world today that we have.”

The Loudoun County Fire Marshal’s Office typically trains its bomb-sniffing dog in a school facility at least once a month using real explosives, Deputy Fire Marshal Jerry Swain said. His department has strict inventory protocols, such as weighing materials to ensure that no explosives are left behind at the schools, warehouses and county-owned facilities they use.

“One of the things that we try to do with all canines is expose them to as many different environments and surfaces as we can, so then when the real call comes in, they will already be familiar with that particular environment,” Swain said. “The animals being familiar with the environment they’re going to work in makes them less apprehensive . . . they’ll be more focused.”

It is unclear what, if any, sanction a CIA employee would face for leaving the explosives behind, and a Loudoun fire department spokeswoman said officials determined that there was no crime involved. But having explosive materials on a school bus or on school grounds normally would lead to serious consequences for a student or a teacher, even if it was an accident, advocates for reforming school discipline policies said.

“If this had been a young person, they probably would have been arrested and most certainly would have been suspended from school — and they would have had their education disrupted substantially,” said Thena Robinson-Mock, a lawyer for the Advancement Project, a national organization that advocates for an end to harsh school discipline policies.

Robinson-Mock pointed to incidents in which students have been arrested even though no crime was committed and no one was in danger, such as when Texas teen Ahmed Mohamed brought a homemade clock to his high school. Other students have been suspended, expelled or arrested for chewing a pastry into the shape of a gun, having a toy gun on a bus and having a knife in a gym bag that was used for equipment maintenance.

“We’re holding young people, particularly children of color, to a very different standard,” said Robinson-Mock.

Jen Underwood, the mother of two elementary school students in Loudoun, praised school officials’ efforts to communicate with families about the incident. The school system informed all parents of its 77,000 students about the mishap via email Wednesday night.

“I appreciated that they were pretty forthcoming as opposed to trying to hide it,” she said.

Underwood said it makes sense for law enforcement agencies to train inside schools. “They need to know how to respond in a school situation,” she said. “There’s a lot of stuff that happens inside schools, and I’d rather they know how to respond than not.”

But she said she wanted to know more about how the CIA managed to overlook the explosive material it left behind.

“I’m surprised that if they use those school buses for training, which makes sense, and they use explosive material, which also makes sense, that they don’t have some kind of inventory,” Underwood said. “Like, ‘I brought this much with me, I’m taking this much home with me.’ ”