The idea of a mass shooter targeting a school and endangering the lives of students and their teachers is terrifying. And unfortunately, this nightmare scenario has become a reality more than once and will continue to do so.

Even though we don’t like to think about it, the truth is that going to school can be dangerous for our children. And wherever there is a potential danger, security measures should be in place to prevent tragedies and keep vulnerable people safe.

We can’t just pray or wish for our children to be safe. We need to act, and these nine ideas for improving school security are a good starting point.

1. Involve students in prevention efforts

Many school shooters are students or past students. It’s possible to prevent school shootings instead of reacting to them by paying attention to warning signs. And to improve school security through prevention, getting students involved is a good idea.

The school must tell them they must report it if they have a good reason to think a fellow student might commit violence. And then the school must be able to respond appropriately.

2. Control access to the school at all times

Anyone who does not belong in a school should be denied access at the beginning and at the end of the day and at all times. Guests should be required to sign in at the security desk.

Parking lots and student drop-off zones should be monitored, and access to the school should be controlled to ensure no one is trying to walk in with a weapon or other prohibited items.

3. Rely on AI security to detect threats

Using AI security helps monitor access to a school. Screening solutions can detect guns, knives, and other potential threats and alert the school’s security personnel.

With AI security technology, anyone who enters the school will be scanned. Students, teachers and employees will go through their day without disruption, while the technology keeps them safe by ensuring no weapons are entering the school.

4. Have on-site security personnel

Schools should consider hiring on-site security personnel capable of handling different threats to improve their security efforts instead of relying only on law enforcement. School shootings can happen quickly, and the police might not get there to prevent a tragedy.

Having on-site security personnel for the school could mean hiring security agents or seeking trained volunteers such as veterans or retired police officers.

5. Implement a two-way communication system

Each classroom should have a microphone and speakers to communicate easily with the school’s security office in an emergency. This two-way communication system would help security personnel respond more quickly.

An alternative would be to install panic buttons in each classroom and train teachers and students on how and when this technology should be used.

6. Make classrooms more secure

A few steps can be taken to help make classrooms more secure if students and their teachers ever need to shelter in place.

All classroom doors must be locked quickly and effectively from the inside. As for all windows, including the ones on doors, there should be a way to quickly cover them to prevent anyone from looking inside the classroom.

7. Conduct drills with teachers and their students

The school should have emergency protocols so everyone knows how to respond to different emergencies. For example, if there is an active shooter in the school, all teachers and students should know that they need to shelter and seek a place to hide.

It’s a good idea to conduct drills for different situations. Students are probably already familiar with fire drills but must know how to react to other emergencies.

8. Keep unoccupied areas locked

Unoccupied areas of a school should be locked when they are not in use. And schools should know who has the keys and who is responsible for locking and unlocking these areas.

This helps prevent suspicious individuals and trespassers from finding a place to hide within the school.

9. Keep the school’s exterior well lit

Finally, keeping the school’s exterior well lit during the evening is important. Lights connected to motion sensors can help deter anyone lurking around the school and prevent them from finding a place to hide.

Exterior lights can also help prevent trip-and-fall accidents, another way to protect students, teachers and school personnel.

Of course, more can be done to ensure schools are safe environments for everyone. Protocols should be in place for different emergencies, including medical emergencies and situations related to the weather.