CAPE CANAVERAL, Fla. (AP) — A NASA spacecraft designed to burrow beneath the surface of Mars landed on the red planet Monday after a six-month, 300-million-mile (482-million-kilometer) journey and a perilous, six-minute descent through the rose-hued atmosphere.

After waiting in white-knuckle suspense for confirmation to arrive from space, flight controllers at NASA’s Jet Propulsion Laboratory in Pasadena, California, leaped out of their seats and erupted in screams, applause and laughter as the news came in that the three-legged InSight spacecraft had successfully touched down.

People hugged, shook hands, exchanged high-fives, pumped their fists, wiped away tears and danced in the aisles.

“Flawless,” declared JPL’s chief engineer, Rob Manning.

“This is what we really hoped and imagined in our mind’s eye,” he said. “Sometimes things work out in your favor.”

A pair of mini satellites trailing InSight since their May liftoff provided practically real-time updates of the spacecraft’s supersonic descent through the reddish skies.

A quick photo sent from Mars’ surface was marred by specks of debris on the camera cover but showed a flat surface with few if any rocks — just what scientists were hoping for. Much better pictures will arrive in the hours and days ahead.

A NASA spacecraft designed to burrow beneath the surface of Mars landed on the red planet Monday after a six-month, 300 million-mile journey and a perilous, six-minute descent through the rose-hued atmosphere. (Nov. 26)

“What a relief,” Manning said. “This is really fantastic.” He added: “Wow! This never gets old.”

InSight, a $1 billion international venture, reached the surface after going from 12,300 mph (19,800 kph) to zero in six minutes flat, using a parachute and braking engines. Radio signals confirming the landing took more than eight minutes to cross the nearly 100 million miles (160 million kilometers) between Mars and Earth.

Viewings of the televised activity inside the JPL control room were held coast to coast at museums, planetariums and libraries, as well as New York’s Times Square.

NASA last landed on Mars in 2012 with the Curiosity rover.

“Landing on Mars is one of the hardest single jobs that people have to do in planetary exploration,” InSight’s lead scientist, Bruce Banerdt, said before Monday’s success. “It’s such a difficult thing, it’s such a dangerous thing that there’s always a fairly uncomfortably large chance that something could go wrong.”

Mars has been the graveyard for a multitude of space missions. Up to now, the success rate at the red planet was only 40 percent, counting every attempted flyby, orbital flight and landing by the U.S., Russia and other spacefaring countries since 1960.

The U.S., however, has pulled off seven successful Mars landings in the past four decades, not counting InSight, with only one failed touchdown. No other country has managed to set and operate even a single spacecraft on the dusty surface.

InSight was shooting for Elysium Planitia, a plain near the Martian equator that the InSight team hopes is as flat as a parking lot in Kansas.

The stationary 800-pound (360-kilogram) lander will use its 6-foot (1.8-meter) robotic arm to place a mechanical mole and seismometer on the ground. The self-hammering mole will burrow 16 feet (5 meters) down to measure the planet’s internal heat, while the seismometer listens for possible quakes.

No lander has dug deeper on Mars than several inches, and no seismometer has ever worked on the planet.

Germany is in charge of InSight’s mole, while France is in charge of the seismometer.

An ecstatic Philippe Laudet, the French Space Agency’s project manager, said at JPL that now that the seismometer is on Mars, a “new adventure” is beginning.

By examining the interior of Mars, scientists hope to understand how our solar system’s rocky planets formed 4.5 billion years ago and why they turned out so different — Mars cold and dry, Venus and Mercury burning hot, and Earth hospitable to life.

InSight has no life-detecting capability, however. That will be left to future rovers, such as NASA’s Mars 2020 mission, which will collect rocks that will eventually be brought back to Earth and analyzed for evidence of ancient life.