At the Samuel H. Daroff Elementary school in West Philadelphia, students must pass a security officer who uses a metal detector wand to search for possible weapons. A network of cameras pans the grounds and beyond for any sign of trouble.
It's a typical scene in a city where schools have become a refuge from drug-fueled gang shootings.
It's also a scene in sharp contrast with schools in suburbia, rural America and at the one-room Amish schoolhouse an hour west of Philadelphia where a gunman struck Monday.
The attack, which left five girls dead, was the latest school shooting far from an urban center, illustrating for some experts that city schools have often succeeded in making themselves safer.
Last week in Bailey, Colo., a man held students as hostages in a classroom and then killed one of them and himself. Also last week, a principal was fatally shot by a student in rural Cazenovia, Wis.
Despite such shootings, the public tends to view city schools as less secure and more dangerous — yet urban districts are consistently better prepared, said Ken Trump, president of the National School Safety and Security Services, a consulting firm in Cleveland.
Suburban, rural and private schools frequently "have not gotten past the 'it can't happen here' mentality," he said.
"That's the first perception — inner cities are the problem hotspots and the rural areas are safer," agreed Ronald Stephens, executive director of the California-based National School Safety Center. "This is a reminder that no place, person or school system is immune from violence."
Delores Shur, a 42-year-old West Philadelphia homemaker, said the Amish school shooting unnerved both her and her 13-year-old son, Darren.
Despite all the security precautions at the 850-student Daroff Elementary, she wondered what any school could do to stop a person determined to find a way inside.
"Anybody could walk into the schools," she said.
Jeffrey Jackson, the Philadelphia school system's manager of non-instructional services, said security systems are not the only reason schools like Daroff Elementary have never had a shooting, despite violence in the community.
He cited an urban attitude in which guns are looked at with greater suspicion than in rural areas, where you have "that God and country thing, the right to bear arms."
"Violence we see in the city is directed, like a drug deal gone bad or a bad relationship," Jackson said. "We know about it."
At Daroff Elementary, Officer Michael Gammon monitors 28 views of the school and can even scan the McDonald's restaurant across the street.
All the city's high schools have even tighter security, requiring students and visitors to walk through metal detectors, said James Golden, its chief safety executive.
The district has deployed 2,800 security cameras at 150 schools of all levels and the remaining 120 schools will soon get them as well, he said. About 450 police officers are also stationed at schools.
"There is a balance you can strike," said Paul Vallas, the Philadelphia school district's chief executive. "You can add these things and create a school environment that's conducive to learning."