The US space shuttle Endeavour prepared to undock from the International Space Station and jet back to Earth overnight, wrapping up its final journey before entering retirement, Nasa said.
Endeavour's last mission is the penultimate flight for the 30-year US shuttle program, which will end for good after the Atlantis mission to the orbiting research lab in July.
The six-member crew of the Endeavour bid farewell to three astronaut colleagues on board the space station (ISS) and closed the hatches between the shuttle and station at 7:23 am, Nasa said.
The astronauts were to spend the afternoon sleeping in preparation for the late night undocking set for 11:55 pm, Nasa said.
Endeavour's 16-day mission began with the shuttle's launch from Cape Canaveral, Florida on May 16 and will conclude when the shuttle lands back on Earth early on June 1.
The team spent a total of 10 days, 23 hours, and 45 minutes at the space station.
During that time, the crew delivered and installed a massive physics experiment, the Alpha-Magnetic Spectrometer-2, that will be left at the space station to scour the universe for clues about dark matter and antimatter.
They also brought up a logistics carrier with spare parts for the orbiting lab and performed some maintenance and installation work during four spacewalks, the last to be done by an American shuttle crew.
A spacewalk is planned during Atlantis's mission in July but it will be done by space station crew, not astronauts who arrive aboard the US shuttle.
Endeavour is scheduled to land at Kennedy Space Center at 2:35 am on Wednesday, carrying its crew of five US astronauts and Italian Roberto Vittori.
The shuttle commander is Mark Kelly, whose lawmaker wife Gabrielle Giffords is recovering from a bullet wound to the head. The Arizona congresswoman was shot by a lone gunman during a meeting with local voters in January. Six people were killed.
Giffords was granted leave by her rehabilitation doctors to watch the launch from Kennedy Space Center along with other astronaut family members two weeks ago, but is not expected to return for the middle-of-the-night landing.
After the final shuttle missions, the three spacecraft in the flying fleet and the prototype Enterprise will be sent to different museums across the country.
Discovery, the oldest in the group, was the first shuttle to retire after its final journey to the ISS ended in March. Endeavour is the youngest, and flew its first space mission in 1991. STS-134 marks its 25th and final mission.
Endeavour is the sixth US space shuttle ever built, and was commissioned after the Challenger exploded in 1986.
The other original members of the fleet include Enterprise, a test model that never flew in space, and Columbia which disintegrated on its return to Earth in 2003.
A total of 14 astronauts were killed in the Columbia and Challenger disasters.
With the US shuttle program closing, the world's astronauts will rely on Russia's space capsules for transit to the ISS at a cost of US$51 million per seat until a new American spacecraft can be built by private enterprise, possibly by 2015.