It’s a freezing, snowy day on the border between Estonia and Russia. Soldiers from the two nations are on routine border patrol, each side accompanied by an autonomous weapon system, a tracked robot armed with a machine gun and an optical system that can identify threats, like people or vehicles. As the patrols converge on uneven ground, an Estonian soldier trips and accidentally discharges his assault rifle. The Russian robot records the gunshots and instantaneously determines the appropriate response to what it interprets as an attack. In less than a second, both the Estonian and Russian robots, commanded by algorithms, turn their weapons on the human targets and fire. When the shooting stops, a dozen dead or injured soldiers lie scattered around their companion machines, leaving both nations to sift through the wreckage — or blame the other side for the attack.

The hypothetical scenario seems fantastical, but those battlefield robots already exist today in an early form. Milrem Robotics, a company based in Estonia, has developed a robot called THeMIS (Tracked Hybrid Modular Infantry System), which consists of a mobile body mounted on small tank treads, topped with a remote-weapon turret that can be equipped with small or large-caliber machine guns. It also includes cameras and target-tracking software, so the turret can pursue people or objects as programmed. This is a human-controlled system for now (and Milrem, for its part, insists that it will remain that way), but the components are there for a robot that can interpret what it sees, identify likely combatants and target them, all on its own. “The possible uses for the THeMIS,” the robot’s builders gush on the website, “are almost limitless.”

[Sign up for the weekly At War newsletter to receive stories about duty, conflict and consequence.]

The decision to use a lethal weapon in battle against combatants has always been a decision made by a human being. That may soon change. Modern advancements in artificial intelligence, machine image recognition and robotics have poised some of the world’s largest militaries on the edge of a new future, where weapon systems may find and kill people on the battlefield without human involvement. Russia, China and the United States are all working on autonomous platforms that pair weapons with sensors and targeting computers; Britain and Israel are already using weapons with autonomous characteristics: missiles and drones that can seek and attack an adversary’s radar, vehicle or ship without a human command triggering the immediate decision to fire.

Under what circumstances can and should militaries delegate the decision to take a human life to machines? It’s a moral leap that has raised fundamental questions about the nature of warfare and that military planners, human rights organizations, defense officials, research analysts and ethicists have yet to reach a consensus on.