MOUNTAIN VIEW, Calif. — At 7:22:07 p.m. on a recent Thursday, an electronic alarm went off in the soundproof control room of a suburban office building here.

A technician quickly focused on the computer screen, where the words “multiple gunshots” appeared in large type. She listened to a recording of the shots — the tat-tat-tat-tat-tat of five rounds from a small-caliber weapon — and zoomed in on a satellite map to see where the gun had been fired: North 23rd Street in Milwaukee, 2,200 miles away.

At 7:23:48, the technician, satisfied that the sounds were gunshots, sent an alert to the Milwaukee Police Department. Less than two minutes later, or at 9:25:02 p.m. Wisconsin time, a tactical team arrived at the address to find five .22-caliber shell casings and a bleeding 15-year-old boy who had been shot in the arm. The casings, said Chris Blaszak, a detective assigned to the department’s intelligence fusion center, were found within 17 feet of where the alert had placed the gunman. Total elapsed time: 3 minutes, 55 seconds.

Milwaukee is one of an increasing number of cities around the country — just under 70 to date, including some in the New York area — that are using a gunshot detection system called ShotSpotter to pinpoint the location of gunfire seconds after it occurs. Last year, the company that developed ShotSpotter began offering a more affordable system, and that has brought in new clients and led other cities to consider trying it.