BENSALEM, Pa. — They call it the “magic box.” Its trick is speedy, nearly automated processing of DNA.

“It’s groundbreaking to have it in the police department,” said Detective Glenn Vandegrift of the Bensalem Police Department . “ If we can do it, any department in the country can do it.”

Bensalem, a suburb in Bucks County, near Philadelphia, is on the leading edge of a revolution in how crimes are solved. For years, when police wanted to learn whether a suspect’s DNA matched previously collected crime-scene DNA, they sent a sample to an outside lab, then waited a month or more for results.

But in early 2017, the police booking station in Bensalem became the first in the country to install a Rapid DNA machine, which provides results in 90 minutes, and which police can operate themselves. Since then, a growing number of law enforcement agencies across the country — in Houston, Utah , Delaware — have begun operating similar machines and analyzing DNA on their own .