A 16-year-old landed in jail last week for allegedly gunning down a man in cold blood on a road in Stockton, California.

During the same time, Terry Emerson found himself behind bars after Stockton police found three illegal handguns in his car during a traffic stop.

These events, while unfortunate, would not be out of the ordinary for an area that has historically struggled with crime. Of particular interest, however, is how these men were tracked: using a police surveillance drone.

In the pop culture of decades past, criminals always had the edge. Barney Fife caricatures would lose to criminals wielding Tommy guns, and John Dillinger-style gangsters handily evaded chase in their souped-up getaway cars. Indeed, at least in the opinions of law enforcement representatives, the technical balance of power has traditionally favored the bad guys.

But in this brave new world of drones, self-driving cars and artificial intelligence, police officers could soon gain the advantage. And though this trend doesn’t necessarily foreshadow some dystopian police state, given cops’ checkered history with Americans’ constitutional rights, civil liberties advocates will have to play a crucial role in balancing the scales of power between officer and citizen.

Back in July 2016, when the Dallas Police Department sent in a police robot rigged with C4 to take out the shooter who killed five officers and injured seven others, as well as two civilians, it marked the first time police had used a bomb robot to kill someone. The department had obtained the robot through the Pentagon’s 1033 program, which allows law enforcement agencies to buy surplus military equipment from the Department of Defense. By 2016, state and local law enforcement agencies across the country had acquired 628 of these robots.

Today, Taser International Inc. is exploring how to outfit drones with cameras and stun guns. The company has held discussions with police officials about deploying these devices for law-enforcement work. Drones aren’t limited to larger departments, either; even smaller law enforcement agencies are readily using this technology.

Launching robots from self-driving cars sounds like something straight out of Bruce Wayne’s Batcave, but autonomous police vehicles are not a distant reality. Taser Inc. has also received inquiries into the feasibility of deploying bots from autonomous police vehicles.

And while Robocop will not be kicking in doors on no-knock warrants any time soon, the idea is in the works. The Knightscope K5 is a fully-autonomous surveillance bot with facial recognition and license-plate-scanning ability. It can capture audio and video, test the air for chemicals and distinguish “suspicious activities” from normal behavior. The K5 doesn’t use weapons, but a new line of “mechanical officers” could breach doors and hold live weapons. The Greensboro Police Department in North Carolina claims the department brings in 60 calls per year for which these robots may be suited.

The Marshall Project, a nonprofit news organization that covers the criminal justice system, interviewed criminal justice and technology experts who note that this emerging technology could drastically change policing. Bernard Levin, co-author of 2011’s “The Future of Policing,” anticipates that drones and ubiquitous traffic cameras could one day determine the identity of a bank robber in minutes. And catching him would be just as easy. “With fully autonomous cars and highways all interconnected, roads and vehicles could simply be powered off,” Levin told The Marshall Project. Alternatively, authorities could disable the suspect’s getaway car remotely.

The challenge of this new era of police technology will be to respect civil liberties and maximize the good applications of emerging tech while minimizing its scarier uses. A robot with facial-recognition technology could deliver a phone and a pizza to an armed man on a freeway overpass threatening suicide, but it could also be used to surveil illegally innocent civilians. Civil libertarians are right to worry about the depersonalization effects of robots or drones operated by remote officers. In one case gone wrong, a police robot burned down a Tennessee mobile home when it dropped tear-gas grenades in the living room — one of which exploded, engulfing the home in flames.

Of course, a skeptic of the cops-winning-the-tech-arms- race narrative could argue that any enterprising criminal can use the same technologies that police departments are prototyping. But the average criminal doesn’t have access to nearly the same quantity or quality of tools that some departments are acquiring. Emerging technologies thus have the potential to shift drastically the capabilities of police departments vis-a-vis everyday Americans.

Indeed, Terry Emerson and the murder suspect from Stockton lacked the means to respond to police drone surveillance with drones of their own. Whether this is a good thing for society will depend on how well police balance the constitutional rights of citizens with their new gadgets. Citizens and communities will need to advocate for both accountability and transparency without unreasonably restricting law enforcement capabilities.

We’re far from witnessing the beginnings of a Hunger Games-style totalitarian future, but that doesn’t give law enforcement carte blanche to use powerful technologies however they prefer. In a world of high-tech cops, guarding our civil liberties is more important than ever.