Washington: NASA astronaut Peggy Whitson, who spent a record-breaking 665 days in space, has retired from the space agency.
Whitson, the 58-year-old NASA astronaut, holds the US record for most cumulative time in space.
She also claimed the title for most spacewalks by a woman -- 10 spacewalks totalling 60 hours and 21 minutes -- and set the record for most time spent in space by a US astronaut, placing eighth on the all-time space endurance list.
"It's been the greatest honour to live out my lifelong dream of being a NASA Astronaut," Whitson tweeted late on Friday.
Whitson also served as chief of the astronaut corps from 2009 to 2012, becoming both the first woman to hold the position and the first non-military astronaut corps chief.
As an astronaut, Whitson completed three long-duration missions to the International Space Station (ISS), setting records on each.
Travelling for the first time to the International Space Station (ISS) in 2002, Whitson took part in 21 science investigations and became NASA's first space station science officer.
In 2008, she returned to the ISS and became the first female commander of the space station.
During her most recent mission, from November 2016 to September 2017, Whitson became the first woman to command the space station twice.
"Thank to all who have supported me along the way. As I reminisce on my many treasured memories, it's safe to say my journey at NASA has been out of this world!" Whitson tweeted.
Born in 1960, Whitson, a native of Iowa, first came to NASA in 1986 as a National Research Council Resident Research Associate at NASA's Johnson Space Centre in Houston.
She served in a number of scientific roles, including project scientist for the Shuttle-Mir Programme and co-chair of the US-Russian Mission Science Working Group, before her selection to the astronaut corps in 1996.
"Peggy Whitson is a testament to the American spirit," NASA Administrator Jim Bridenstine said in a statement.
"Her determination, strength of mind, character, and dedication to science, exploration, and discovery are an inspiration to NASA and America.
"We owe her a great debt for her service and she will be missed. We thank her for her service to our agency and country," Bridenstine said.