In the end it was a textbook landing. Discovery touched down in the Californian darkness, a day late.
Nasa was determined to bring the shuttle down on Tuesday
"How do you feel about a beautiful clear night with a breeze down the runway in the high desert of California?" Mission Control asked the crew, when clearance was given to land.
"We are ready for whatever we need to do," replied commander Eileen Collins.
Mission Control reported no problems as the shuttle plunged through the atmosphere over the Pacific Ocean.
Then a resounding double sonic boom rang out as Discovery swooped over the Mojave Desert. It was the sound Nasa was waiting for - absent from Columbia's doomed return to Earth.
"Congratulations on a truly spectacular test flight," astronaut Ken Ham at Mission Control in Houston told the Discovery crew as the shuttle stopped on the runway at the Edwards Air Force Base. "Welcome home, friends."
"We're happy to be back and we congratulate the whole team for a job well done," Commander Eileen Collins replied, to cheers from Nasa personnel at the base.
Nasa managers gathered at Cape Canaveral, the shuttle's customary landing site, hailed the mission a success.
"It's going to be a new beginning for the space shuttle program," said Nasa's spaceflight chief, Bill Readdy.
The shuttle made a "perfect" landing in California
"The approach that we've taken has to do with a very methodical series of flight tests. It's exactly the right approach.
"This was certainly the most documented flight in shuttle history," he added.
The mission was largely designed to test changes made to the shuttle since the Columbia disaster.
Three space walks were carried out, including one in which crew member Stephen Robinson extracted two ceramic-fibre strips protruding from between the shuttle's protective tiles.
Astronauts also tested repair techniques put in place after the Columbia tragedy, and replaced one of four gyroscopes used to steer the International Space Station (ISS).
The crew of seven delivered supplies and parts to the ISS and retrieved waste. However, the mission was not entirely successful. Modifications adopted after the Columbia tragedy failed to stop pieces of foam breaking off the external fuel tank on launch.
All future shuttle missions are on hold while Nasa investigates.