A Methuen Massachusetts school will soon deploy an automated system to detect and track a gunman on campus.

Methuen Mayor Stephen Zanni and other city officials will attend a demonstration of the technology developed by Massachusetts-based Shooter Detection Systems, said Fox News.

The smoke alarm-sized system, which is fully automated, will give police a shooter's exact location in real time. The system relies on sensors to send an alert to police within one second of a gunshot being fired, said Fox News. Once the sensors are activated, they begin recording from inside the building, so first responders know what's happening before they enter the vicinity.

School officials say the investment will dramatically improve current school lockdown procedures.