Mission Control waited as long as possible for the weather to improve before finally giving up and directing commander Scott Altman and his crew to the Mojave Desert.
Atlantis swooped through a clear morning sky and touched down on the runway at Edwards Air Force Base.
"Welcome home, Atlantis," Mission Control radioed once the shuttle came to a safe stop. "Congratulations on a very successful mission giving Hubble a new set of eyes."
"It was a thrill from start to finish," Altman replied. "We've had a great ride."
After 13 days in orbit, many of them tending to Hubble, Altman and his crew were anxious to be back on the ground. They were supposed to land Friday, but NASA kept the astronauts circling the world in case thunderstorms from a lingering low-pressure system eased up.
The weather did not improve enough Sunday, and Mission Control passed up landing opportunities for a third straight day at Kennedy Space Center.
Altman was grateful for the pristine conditions at Edwards, NASA's backup landing site. "A beautiful day in the desert," he said before heading back.
NASA loses at least a week of work and close to $2 million in ferry costs by landing in California. And the astronauts will have to wait another day to be reunited with their families, who were in Florida.
The previous shuttle landing at Edwards was in November.
Atlantis ended up circling Earth 197 times and logged 5.3 million miles during its journey.
The astronauts left behind a refurbished Hubble that scientists say is better than ever and should keep churning out pictures of the universe for another five to 10 years. They carried out five spacewalks to give the 19-year-old observatory new science instruments, pointing devices and batteries, and fix a pair of broken instruments, something never before attempted. Stuck bolts and other difficulties made much of the work harder than expected.
The $1 billion overhaul was the last for Hubble and, thanks to the crew's valiant effort, won praise from President Barack Obama and members of Congress. But with space shuttles retiring next year, no more astronauts will visit the telescope, and NASA expects to steer it into the Pacific sometime in the early 2020s.
The astronauts brought back the old wide-field camera they pulled out, so it can be displayed as a souvenir for the masses at the Smithsonian Institution. The replacement camera and other new instruments will enable Hubble to peer deeper into the universe, to within 500 million to 600 million years of creation.
It will take almost all summer for scientists to check out all the new telescope systems. NASA expects to release the first picture in early September.
This mission almost didn't happen. It was canceled in 2004, a year after the Columbia tragedy, because of the dangers of flying into a 350-mile-high orbit that did not offer any shelter in case Atlantis suffered damage from launch debris or space junk. The public protest was intense, and NASA reinstated the flight after developing a rescue plan and shuttle repair kits.
Shuttle Endeavour was on standby for a possible rescue mission until late last week, after inspections found Atlantis' thermal shielding to be solid for re-entry. Endeavour now will be prepped for a June flight to the international space station.