A recent CBS News report shows a dramatic rise in the number of school shootings in the past 13 years.
That report also found that in three out of four school shootings, the suspect walked right in through the main entrance.
Today's schools are challenged to determine how best to keep kids safe.
CBS 5 Investigates found many are responding in a way that could be putting children in danger.
"You're not safe anywhere. You need to be prepared for anything," said a parent in Mesa.
In some Arizona school districts, officials are putting up fencing and gates without permits and locking up exit routes critical in an emergency.
"It's probably been around the last six months that we caught up with the process of them actually locking the gates with chains and locks. People need to be able to get away," said Arizona State Fire Marshal Bob Barger.
Barger says too many schools are locking bad guys out and, in the process, locking children in.
He gave CBS 5 Investigates photos showing doors being secured with heavy chains and padlocks, which are clear violations of the state's fire code.
"When you lock it and chain it, that egress pass is impeded, and they can't get out, and you can't get away," said Barger.
CBS 5 Investigates contacted several fire departments across Arizona. Their responses indicate it's a dangerous practice on campuses everywhere.
"The challenge of keeping kids safe is probably not knowing what the next incident will be," said Helen Hollands with Mesa Public Schools, the largest district in the state.
According to sources, the district is the state's worst offender.
The State Fire Marshal says Mesa has a history of noncompliance dating back to 2011. In June of this year, the district had outstanding violations at 16 schools.
Hollands said the purpose of the chains and locks was to prevent individuals from entering the campus.
She cites getting the funds from a bond passed last November as the reason it's taken so long to fix the fire code violations.
CBS 5 Investigates was along for the ride for an inspection in Chandler with Assistant State Fire Marshal Frederick Durham. He showed the markings where a school had previously installed a heavy-duty chain and lock and then had it removed.
"We don't want to create a situation where, because of security, we cause tragedy," said Durham.
Nearly everyone understands the difficult balance schools must attain in trying to keep kids safe.
However, fire officials say breaking the law won't fix the problem.
"Their hearts were in the right place, but we can't allow security to interfere with safety," said Durham.
The Arizona State Fire Marshal's office said that because of the inquiries from CBS 5 Investigates, Mesa Public Schools has ramped up their efforts to get the proper permits and fix the violations.
They also say because of budget cuts, school inspections are running about three years behind.
Copyright 2013 CBS 5 (KPHO Broadcasting Corporation). All rights reserved.