The astronauts on NASA's final shuttle voyage floated out of the International Space Station for the last time on Monday, leaving behind a historic US flag and a commemorative shuttle model to mark the end of a 30-year era.
Atlantis was set to undock from the orbiting lab early on Tuesday, providing the last glimpses of a space shuttle in flight before the fleet is retired.
As the hatches swung shut behind the four crew members of Atlantis, it closed "a chapter in the history of our nation," space station astronaut Ronald Garan Jr noted in Monday's emotional farewell ceremony.
He attached the small flag, which rocketed into orbit on the very first shuttle flight in 1981, to the door of the space station hatch before the shuttle astronauts departed. Atlantis has been parked at the space station for over a week, unloading a year's worth of supplies and packing up trash and old equipment for the trip home.
Atlantis is due to land at Florida's Kennedy Space Center just before sunrise Thursday.
It was a heartfelt goodbye for the two crews, numbering 10 astronauts in all from three countries. They embraced one another. Sandra Magnus wiped away tears.
Atlantis' commander, Christopher Ferguson, presented the flag to the space station crew, along with a small model of a space shuttle. He said he wishes he could have brought a monument to commemorate the 30-year shuttle program, but it would not have fit.
"We brought the best monument we could possibly find, and that's a space shuttle model," he said.
The model, signed by senior shuttle managers and flight directors, was also was hung near the hatch.