During their shared flight, the two crews improved and expanded the space station, installing a porch for experiments on Japan's science lab and plugging in fresh batteries.

They also shared some unexpected inconveniences, most notably a flooded toilet and an overheated air-cleansing system, both of which ended up being fixed.

On their last morning together, they even dressed alike. All wore matching black polo shirts and most of them had on tan pants.

Polansky thanked the station residents for being "tremendous hosts."

"It was just a wonderful, wonderful experience to be part of the first crew of 13 people up here and to have representatives from all the international partners, which made it a very special event," Polansky said just before the hatches were closed.

Endeavour's astronauts will inspect their ship Wednesday, using a laser-tipped boom, to make sure the thermal shielding was not pierced by micrometeorites or space junk.

Coming home is Koichi Wakata, a Japanese astronaut who spent 4 1/2 months at the space station. He was next to last to leave, waving goodbye until the moment he disappeared into the shuttle.

The very last to leave was Polansky. He jokingly counted all six station residents to make sure the head count was right.

American Timothy Kopra replaced Wakata on the space station. Another American also stayed behind, as well as one Canadian, one Belgian and two Russians.

Thanks to the astronauts' efforts, the space station is now 83 percent complete, with almost 700,000 pounds of mass.

Seven more shuttle flights are planned over the coming year to complete the orbiting outpost; the next one is targeted for the end of next month. The space station's population temporarily will swell to 13 again then.

An unmanned supply ship, meanwhile, will arrive at the complex Wednesday.