CAPE CANAVERAL, Fla. — Space shuttle Atlantis returned from its final voyage yesterday, closing out a quarter-century flying career and safely bringing back six astronauts from a successful space station mission.

“Twenty-five years, 32 flights, and more than 120 million miles traveled. The legacy of Atlantis now in the history books,’’ Mission Control’s commentator announced at touchdown.

About 1,200 guests — the maximum number allowed — lined the Kennedy Space Center runway for the conclusion to NASA’s third-to-last shuttle flight. Employees wore white ribbons with the name “Atlantis’’ and its picture embossed in gold. Even the lead flight directors came in from Houston for the event.

“That was pretty sweet,’’ Mission Control radioed after Atlantis glided through a clear morning sky. “That was a suiting end to an incredible mission.’’

Commander Kenneth Ham replied that he was ready to turn Atlantis over to the ground teams and get the ship “back in the barn for a little bit.’’ He and his crew faced a longer receiving line than usual, after emerging into the sunshine.

Only two shuttle missions remain, by NASA’s two other spaceships. Barring a reprieve from the White House, Atlantis will stand by as a rescue ship for the very last shuttle flight, then head off to a museum somewhere.

Atlantis’s all-male crew accomplished everything its members set out to do after rocketing into orbit May 14, installing a new Russian compartment, six fresh batteries, and an extra antenna at the International Space Station.

Atlantis — the fourth in NASA’s shuttle series — is ending its run after having spent an accumulated 294 days in orbit and circled Earth 4,648 times. It has carried 189 astronauts and visited the International Space Station 11 times. It also flew seven times to Russia’s old Mir station and once to the Hubble Space Telescope.

The shuttle added 4.8 million more miles this time around, for a grand total of 120,650,907 miles over its lifetime. The 120-millionth mile was logged shortly after midnight.

At the space station, the residents managed to catch a glimpse of Atlantis’s final reentry. “Most impressive,’’ observed astronaut Timothy Creamer.

© Copyright 2010 Globe Newspaper Company.