Police were alerted to the shooting rampage in downtown Fresno, California, on Tuesday by a sophisticated gunfire detection technology.

Three people were killed in the shooting spree that police think was racially motivated. All the victims were white males.

The ShotSpotter gunfire detection system, which uses a network of sensors to “listen” for shots being fired, immediately alerted police to the shooting.

FRESNO SHOOTING RAMPAGE: SUSPECT WHO SHOT DEAD 3 WANTED TO KILL AS MANY PEOPLE AS POSSIBLE, POLICE SAY

“A total of 16 rounds were fired according to our gunshot detection system, and all of those occurred in approximately a minute to a minute and a half,” said Fresno Police Chief Jerry Dyer. “As a result, what we know is that three people were shot and one person shot at in less than a two-minute timeframe.”

The shooting spree began around 10:45 a.m. local time, when one person was shot in a PG&E utility truck, a second person was shot on Fulton Street and a third person was shot in the parking lot of Catholic Charities, FOX 26 News reported. All three shooting locations were close to each other in the downtown area.

Dyer said that, without the ShotSpotter system, more people may have been killed.

INCREDIBLE TECH DETECTS GUNFIRE ACROSS AMERICA

Within its area of coverage, ShotSpotter can tell police where the shot was fired, how many shots, and the number and type of weapons involved.

Fox News’ Jonathan Hunt and Allison Barrie contributed to this report.