(AP) -- Its decades-long mission accomplished, space shuttle Discovery headed home to retirement after undocking from the International Space Station on Monday for the last time.
The world's most-flown spaceship got a dramatic send-off by "Star Trek's" original Capt. Kirk.
"Space, the final frontier," actor William Shatner proclaimed in a prerecorded tribute. "These have been the voyages of the space shuttle Discovery. Her 30-year mission: to seek out new science, to build new outposts, to bring nations together on the final frontier, to boldly go and do what no spacecraft has done before."
On the final leg of its final journey - due to culminate with a Wednesday touchdown - Discovery performed a victory lap around the space station immediately after undocking. The shuttle and station crews beamed down pictures of each other's vessel, with the blue cloud-specked planet 220 miles below as the stunning backdrop.
NASA TV showed live footage of Discovery as it soared over the Atlantic Ocean and the Sahara desert, and in a matter of a few minutes, over the Mediterranean Sea and northern Italy. The breathtaking shots were captured by the space station crew.
"It looks beautiful," observed Scott Kelly, the space station's skipper. He wished the six shuttle passengers a safe ride home.
To ensure safe passage, the shuttle astronauts pulled out their 100-foot, laser-tipped inspection boom and checked their ship for any signs of micrometeorite damage. The safety procedure was put in place following the 2003 Columbia disaster.
Discovery is being sent to the Smithsonian Institution for display after it undergoes several months of decommissioning. NASA's two other shuttles will join Discovery in retirement, following their upcoming missions.
The oldest of NASA's surviving shuttles, Discovery will have racked up nearly 150 million miles by trip's end, accumulated more than 39 missions in nearly 27 years and spent 365 days total in space. It flew to the International Space Station 13 times and made the first shuttle rendezvous with Russia's Mir station in 1995.
Discovery first flew in 1984 and carried the Hubble Space Telescope to orbit six years later. It's flown 184 astronauts, including John Glenn at age 77 in 1998.
Shatner's message was played for the shuttle crew Monday morning, just a few hours before the undocking. His words were followed by the wake-up music, "Theme from Star Trek." It was the runner-up in a contest sponsored by NASA to mark the end of the shuttle program. The No. 1 vote-getter - "Blue Sky" by Big Head Todd and the Monsters - will be beamed up as Tuesday's wake-up tune.
Mission Control and Discovery's astronauts also paid homage to lead shuttle flight director Bryan Lunney, who is quitting NASA as the program draws to a close. His voice cracked as he bid farewell, and he received a standing ovation in the control room.
"It's been a hoot," Lunney told the astronauts. "Couldn't have had a better choice for my last flight."
Shuttle commander Steven Lindsey said he'd rather be celebrating with Lunney than inspecting his ship.
Lunney was joined earlier in Mission Control by his father, legendary Apollo flight director Glynn Lunney. The younger Lunney is leaving NASA later this month after 22 years and nearly 50 shuttle flights to join a pair of aerospace research companies.
During their 13-day flight, Lindsey and his crew delivered a new storage compartment, as well as an equipment platform and the first humanoid robot in space called R2, which is short for Robonaut 2. Both large items were successfully installed, but R2 will be unpacked by the station crew in the coming weeks.
"If I were unpacked, I would wave goodbye!" R2 said in a Twitter message that was posted by a human on the ground.
The addition of the 21-foot-long, 15-foot wide storage compartment left the space station 97 percent complete. The complex now has a mass of nearly 1 million pounds.
Kenneth Todd, a space station manager, described the completed mission as "above and beyond." He said it was bittersweet to see Discovery for the last time in orbit. "We bid her adieu and certainly godspeed to Steve and the rest of the crew on the way home."
On the next shuttle flight, by Endeavour next month, a $2 billion physics experiment will be installed on the outside of the space station. Atlantis will blast off with supplies on the final shuttle mission at the end of June.
NASA is under presidential direction to focus more on outer space, beginning with expeditions to asteroids and then Mars.
American astronauts will continue hitching rides to the space station on Russian Soyuz spacecraft, at great expense. The intent is for private U.S. companies to take over those ferry operations within a few years.
Explore further: Venus Express spacecraft, low on fuel, does delicate dance above doom below