A driverless Volkswagen won a $2 million race across the rugged Nevada desert Sunday, beating four other robot-guided vehicles that completed a Pentagon-sponsored contest aimed at making warfare safer for humans.

The race displayed major technological leaps since last year's inaugural race, when none of the self-driving vehicles crossed the finish line.

Stanley the VW Touareg, designed by Stanford University, zipped through the 132-mile Mojave Desert course in six hours and 53 minutes Saturday, using its computer brain and sensors to navigate rough and twisting desert and mountain trails. The Stanford team celebrated by popping champagne and pouring it over the mud-covered Stanley.

"This car, to me, is really a piece of history," Stanford computer scientist Sebastian Thrun said after receiving an oversize check for the $2 million prize, funded by taxpayers.

In second place was a red Humvee from Carnegie Mellon University called Sandstorm that completed the course in seven hours, four minutes, followed by a customized Hummer called H1ghlander, from a second Carnegie Mellon team. Coming in fourth was a Ford Escape Hybrid named Kat-5, designed by students in Metairie, La., who lost about a week of practice and some of their homes to Hurricane Katrina.

A fifth vehicle, a 16-ton truck named TerraMax, was the last to finish Sunday, though not within the contest's 10-hour deadline. Its operators paused it Saturday night so it would not have to race in darkness.

It is unclear how the Pentagon's Defense Advanced Research Projects Agency plans to harness the technology used in the race for military applications. But Thrun said he wanted to design automated systems to make next-generation cars safer for everyone, not just the military.

"If it was only for the military, I wouldn't be here today," Thrun said.

Volkswagen plans to use Stanley in promotions, and the vehicle will then be retired to a museum in Germany, Thrun said.

Called the DARPA Grand Challenge, the race began Saturday with a field of 23 autonomous vehicles. Eighteen failed to complete the course because of mechanical failures or sensor problems.

The robotic vehicles had to navigate a course designed to mimic driving conditions in Iraq and Afghanistan.

Only the five robots that completed the course managed to maneuver a steep 1.3-mile mountain pass five miles from the finish line. The mountain ridge -- similar to canyons found in Afghanistan -- was 10 feet wide and had a 200-foot drop-off.