DETROIT — Alondra Alvarez lives about five minutes from her high school on Detroit’s southwest side but she drives there instead of walking because her mother fears for her safety. Once the 18-year-old enters the building, her surroundings take on a more secure feel almost immediately as she passes through a bank of closely monitored metal detectors.

“My mom has never been comfortable with me walking to school. My mom is really scared of street thugs,” said Alvarez, who attends Western International.

As schools around the U.S. look for ways to impose tougher security measures in the wake of last month’s school shooting in Parkland, Florida, that left 17 people dead, they don’t have to look further than urban districts such as Detroit, Chicago, Los Angeles and New York that installed metal detectors and other security in the 1980s and 1990s to combat gang and drug violence.

Security experts believe these measures have made urban districts less prone to mass shootings, which have mostly occurred in suburban and rural districts.

RELATED: 1 million expected at anti-gun-violence marches, students say

Officials in some suburban and rural school districts are now considering detectors as they rethink their security plans after the shooting at Marjory Stoneman Douglas High School, where 19-year-old former student Nikolas Cruz allegedly brought in a duffel bag containing an assault rifle and opened fire. He’s charged with 17 counts of first-degree murder and 17 counts of attempted murder.

The massacre has galvanized thousands of students around the country who walked out of their classrooms for 17 minutes — one for each Parkland victim — on March 14 to protest gun violence.

“I think urban schools are eons ahead. They’ve been dealing with violence a lot longer than suburban schools,” said Philip Smith, president of the National African American Gun Association.

During the mid-1980s, Detroit was one of the first districts in the nation to put permanent, walk-through metal detectors in high schools and middle schools. New York schools also had them in some buildings.

By 1992, metal detectors had been installed in a few dozen Chicago high schools. And in 1993, under pressure to make schools safer, Los Angeles’ district announced that it would randomly search students with metal detectors.

Such measures “are designed to identify and hopefully deter anybody from bringing a weapon to school, but metal detectors alone portray an illusion of being safe,” said Nikolai Vitti, superintendent of the 50,000-student Detroit Public Schools Community District.

“Our schools need to be safer than they are,” Vitti said. “As a nation, we need to fully fund and make sure all districts can adequately staff school resource officers and also offer mental health and first-aid training to all educators.”

Security measures don’t always keep guns off school grounds. A 17-year-old high school senior was killed and another student wounded March 7 in a Birmingham, Alabama, classroom shooting. Metal detectors at the school were not in use that day. A 17-year-old student has been charged with manslaughter.

Two students were shot and three people suffered other injuries in February when a gun in a backpack accidentally fired inside a Los Angeles Unified School District middle school. The district does random metal-detector wand searches daily in middle schools and high schools. A 12-year-old girl has been charged with being a minor in possession of a firearm and having a weapon on school grounds.

In response to the Parkland shooting, Florida’s governor has said he wants to spend $500 million to increase law enforcement and mental health counselors at schools, to make buildings more secure with metal detectors and to create an anonymous tip line.

A package of legislation passed by the New York state Senate includes provisions for metal detectors and improved security technology in schools. A parent in Knox County, Kentucky, has said his law office would donate $25,000 for metal detectors in schools there.

Alvarez, the student at Detroit’s Western International, said she and others who attend the school go through metal detectors every morning. Her elementary and middle schools also had metal detectors.

“I’ve always seen it as something that made me feel safe,” she said, adding that all schools should have them and not just inner-city ones “so students don’t feel discriminated against.”

Metal detectors are seen as a symptom of a “stigma that already exists,” said Mark Fancher, staff attorney for the American Civil Liberties Union of Michigan’s Racial Justice Project.

“There is a presumption that urban schools — particularly those with students of color — are violent places and security demands you have procedures in place that are intended to protect the safety of the students,” Fancher said.

But metal detectors, property searches, security guards and police in schools create conditions similar to those found in prisons, he said.

“Students, themselves, internalize these things,” Fancher said. “If you create a school that looks like a prison, the people who go there will pretty much decide that’s what is expected of them.”

Many urban districts have a greater awareness and sensitivity when it comes to students’ needs, said Kenneth Trump, president of the Cleveland-based National School Safety and Security Services, a K-12 security consulting firm.

“I think in urban schools, the approach of most of the educators, administrators and security personnel is, ‘We realize there are issues kids bring to school,'” said Trump, who has been in the school safety field for more than 30 years. “The people will tell you, ‘We are not in denial … we acknowledge our problems. We just don’t have enough resources to deal with it.'”

Suburban and rural administrators, parents and students often view themselves as different from their big-city counterparts, and that may impact how they treat school security, he said.

“There’s very often that divide of ‘There’s us and there’s them. We’re not the urban district. We are the alternative. We’re the place people go to get away from the urban district,'” he said.