The Cyber Grand Challenge was announced in 2013, and qualifying rounds began in 2014. At the outset, more than 100 teams were in the contest. Through a series of elimination rounds, the competitors were winnowed to seven teams that participated in the finals in August in Las Vegas. The three winning teams collected a total of $3.75 million in prize money.

With the computer security contest, Darpa took a page from a playbook that worked in the past. The agency staged a similar contest that served to jump-start the development of self-driving cars in 2005. It took the winning team’s autonomous vehicle nearly seven hours to complete the 132-mile course, a dawdling pace of less than 20 miles per hour.

Still, the 2005 contest proved that autonomous vehicles were possible, brushing aside longstanding doubts and spurring investment and research that led to the commercialization of self-driving car technology.

“We’re at that same moment with autonomous cyberdefense,” Mr. Walker said.

The contest, according the leaders of the three winning teams, was a technical milestone, but it also shed light on how machine automation and human expertise might be most efficiently combined in computer security.

In the security industry, the scientists say, there is a lot of talk of “self-healing systems.” But the current state of automation, they add, typically applies to one element of security, such as finding software vulnerabilities, monitoring networks or deploying software patches. And automated malware detection, for instance, is often based on large databases of known varieties of malicious code.

For the Darpa test, the attack code was new, created for the event. In the capture-the-flag style contest, the teams played both offense and defense. For the humans, it was hands-off during the competition. The software was on its own to find and exploit flaws in opponents’ software, scan networks for incoming assaults and write code to tighten its defenses.

The winners succeeded in integrating different software techniques, in ways not done before, into automated “cybersecurity systems.” The contest was conducted in a walled-off computing environment rather than the open internet.