An airport in South Carolina will be the first in the U.S. to install a system in the public passenger terminal dedicated to warn against the threat of an active shooter.

Charleston International Airport has poured $170,000 into a gunshot detection system that will alert people near and far from the scene of a potential crime of gunfire.

The Shooter Detection Systems product is smart enough to catch a flash from a firearm being fired or the sound of it to alert people out of gunshot range to take cover.

“Hopefully, we will never need it, but we will have it just in case,” airport CEO Paul Campbell said in a statement.

Preclearance areas at airports are often flooded with travelers, and the new technology will add an extra layer of security to the pick-up, drop-off, ticketing, and baggage areas.

Mass shootings have occurred at a number of airports in recent history, including in Paris, Brussels, Los Angeles, and Fort Lauderdale, Fla.

Charleston International Airport is the state's busiest airport. The eight airlines operating out of the facility processed 3.98 million incoming and outgoing passengers in 2017.