(AP) -- The astronauts on NASA's final shuttle voyage floated out of the International Space Station for the last time Monday, leaving behind a historic U.S. 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 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.
"What you don't see are the signatures of the tens of thousands who rose to orbit with us over the past 30 years, if only in spirit," Ferguson added.
Space station astronaut Michael Fossum accepted the model "as one of the greatest testaments to the shuttle's incredible capability." Almost all of NASA's space shuttle flights since 1998 were devoted to building and maintaining the space station - in all, 37 missions.
"Ninety percent of the world's population can look out of their backyards at night and see us going overhead," Fossum added.
Emotions also welled up, down at Mission Control.
Lead flight director Kwatsi Alibaruho has one more shift remaining before signing off forever from shuttle Mission Control in Houston. He said he and his team vacillate "between intense pride at how well this mission has gone, and sometimes being somewhat freaked out, for lack of a more technical term."
Whenever he pauses to think about the finality of it all, "I get kind of freaked out and have this sinking feeling in my stomach that lasts about five or 10 seconds, and then I go back to doing an impersonation of a steely eyed missile man." he told reporters Monday.
Atlantis will pull away from the space station early Tuesday. As a final salute, the space station will rotate 90 degrees to provide a new angle for pictures.
It will be some time before there are so many people aboard the space station again. The Russian Soyuz capsules - the only way to get astronauts to the space station for at least the next few years - carry no more than three.
New commercial spacecraft under development for astronauts are still at least three to five years away from flying. The first private spacecraft to reach the space station will retrieve the flag left behind. It will fly again on the massive rocket that NASA plans to build to send astronauts out of low-Earth orbit, Ferguson said. "Perhaps to a lunar destination, perhaps to Mars," he noted.
The retirement of NASA's three remaining shuttles has been in the works since 2004, barely a year after the Columbia disaster. Then, President George W. Bush announced a new exploration vision aimed at returning astronauts to the moon. President Barack Obama nixed the moon in favor of an asteroid and Mars. The target launch dates: 2025 for an asteroid and the mid-2030s for the red planet.
Earlier Monday, the astronauts removed a huge storage bin from the station and placed it back aboard the shuttle. The bus-size chamber holds nearly 3 tons of packing foam and other trash, including old equipment. NASA wanted to stockpile the orbiting lab with supplies in case the private companies get delayed in launching their own cargo ships. The first such supply run is expected by year's end.
Atlantis will remain at Kennedy Space Center for retirement, going on public display. Discovery and Endeavour will be transported to museums in suburban Washington and Los Angeles.
While many will descend on Kennedy for Thursday's 5:57 a.m. touchdown, Alibaruho will remain in Houston. He debated whether to be attend the final landing by a space shuttle, but decided to observe it from Mission Control.
"It's home, so that's where I'll be."
Explore further: Astronauts load storage bin on last space shuttle