A new study ranks Fairfax and Montgomery counties as best prepared among the nation's largest school districts to keep children safe during a parent's nightmare: terrorism at school.

On the heels of the latest reminder of the vulnerability of schools -- the hostage crisis that left more than 300 people dead at an elementary school in Beslam, Russia -- the study was conducted by the America Prepared Campaign, a nonprofit group that works with the Department of Homeland Security and advocates readiness for terrorist attacks.

The study gives highest marks to the two Washington area counties and to Palm Beach County in Florida for having comprehensive emergency plans that have been effectively communicated to parents, students and school employees.

Prince George's is the only other area county included in the study, which measured the 20 largest school districts in the contiguous United States on a four-point scale. Prince George's was rated "good," the second-best category. Public school districts in Chicago and Detroit received failing grades.

"It's impossible to see what places like Montgomery County are doing and not be blown away by how much energy and effort they've really put into this stuff," said journalist Steven Brill, the founder of America Prepared and a separate company endeavoring to create a national identification card program to combat terrorism.

Montgomery County's procedure distinguishes two types of emergencies, called Code Red and Code Blue, said Edward Clarke, the district's director of school safety and security. Code Red involves a lockdown of a school campus; Code Blue covers less severe situations, such as inclement weather or reports of a crime suspect near a school.

School administrators maintain close contact with county officials and emergency workers, and the school system runs workshops for teachers and four drills with students every school year, Clarke said.

The plan, similar to those in Fairfax and Prince George's counties, was developed in Montgomery through consultation with security experts and a 2003 grant from the Department of Education. The plan has been refined as new possibilities for school emergencies became apparent.

"The real critical school-crisis tragedies we've all lived with the last several years have forced all of us to be better prepared," Clarke said.

Nationally, school security has elevated in priority in recent years, primarily since with the shootings at Columbine High School in Colorado in 1999. Emergency plans became increasingly sophisticated as the once-unimaginable became grimly episodic: more school shootings, the Sept. 11, 2001, terrorist attacks, and the 2002 sniper shootings in the Washington area.

Still, the study ranks a majority of schools as insufficiently prepared to deal with large-scale emergencies. Only one-fourth of Detroit's public schools have plans to deal specifically with a terrorist attack, according to the report, and most Chicago schools don't stock supplies, such as duct tape, that are recommended by the Department of Homeland Security.

In Detroit, 27.5 percent of parents surveyed said they knew the district's procedure for reuniting with their children after an attack, the report found. In Fairfax County, 45 percent of parents knew the procedure and 75 percent were familiar with the emergency preparedness plan at their child's school.

It is impossible to prepare for the worst crises, such as what happened in Russia, said Russell Tedesco, director of security services for Prince George's public schools. But a thorough, well-publicized emergency plan makes maintaining order and reducing harm more likely than if no plan exists, he said.

"Reasonably, all we can do is rely on the plans we have in place," Tedesco said.

The Department of Education guides school districts to structure their emergency plans in four categories: mitigation and prevention, preparedness, response and recovery. The America Prepared study focused only on preparedness, evaluating districts based on interviews with parents and school officials, and by comparing emergency plans to Department of Education guidelines.

Kenneth Trump, president of National School Safety and Security Services, an independent consulting company, said the America Prepared report oversimplifies the issue of school security with superficial analysis and a sweeping grade scheme. But, he said, it is generally on the mark in its praise of Fairfax and Montgomery counties.

Last year, the National Association of School Resource Officers conducted a survey of more than 700 school-based police officers. It found that 76 percent of the officers felt their schools were not adequately prepared to face a terrorist attack. Schools are a "soft target" for terrorism, Trump said, meaning they are often overlooked in preparation efforts that focus more on bridges, buildings and government offices.

The benefit of the America Prepared study, Trump said, is that it reiterates the need for diligence, planning and adequate funding to prepare for potential attacks on schools.

In the immediate aftermath of crises such as the one in Russia, there is typically renewed vigilance in schools, Trump said, but without a commitment by schools to revise and test emergency plans. "Time and distance breed complacency and fuel denial," he said.