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 (search), designed by Stanford University, zipped through the 132-mile Mojave Desert (search) course in six hours and 53 minutes Saturday, using only 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 oversized check for the $2 million prize, funded by taxpayers. He said he did not know how he would spend the money, but joked that he needed to buy cat food.

Stanford spent $500,000 on the race, some of which was provided by sponsors.

In second place was a red Humvee from Carnegie Mellon University called Sandstorm, followed by a customized Hummer called H1ghlander. 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 lost their homes when Hurricane Katrina blew into the Gulf Coast.

The Humvee, which finished in seven hours and four minutes, traveled farther than any other vehicle last year despite completing only 71/2 miles of the course.

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

It's unclear how the Pentagon 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 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. Even so, most covered more distance than Sandstorm did last year.

Race organizers and team members say improved technology and a familiarity with the race allowed multiple robots to sprint across the finish line.

Even before Saturday's competition, teams practiced their vehicles in various parts of the Southwest desert, including on last year's course. Teams also went back to the drawing board to improve their vehicles' artificial intelligence and sensing systems, which navigate the rough landscape without crashing.

The vehicles were tricked out with the latest sensors, lasers, cameras and radar that feed data to onboard computers, which helped them distinguish dangerous boulders from tumbleweeds and decide whether chasms were too deep to cross.

The robotic vehicles had to navigate a course designed to mimic driving conditions in Iraq and Afghanistan. The course consisted of winding dirt trails and dry lake beds filled with overhanging brush. Parts of the route forced the robots to zip through three tunnels designed to knock out their GPS signals.

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

The turning point occurred Saturday when Stanley overtook the top-seeded H1ghlander at the 102-mile mark.

The race is part of the military's effort to fulfill a congressional mandate to cut casualties by having a third of the military's ground vehicles unmanned in 20 years.

A small fleet of autonomous ground vehicles currently operate in Iraq and Afghanistan, but the machines must be remotely controlled by a soldier who usually rides in the same convoy.