CAPE CANAVERAL, Fla. — NASA's record-breaking astronaut, Peggy Whitson, retired Friday less than a year after returning from her last and longest spaceflight.

She's spent more time off the planet than any other American: 665 days over three space station missions. She's also the world's most experienced female spacewalker, with 10 under her spacesuit belt.

Whitson was the first woman to command the International Space Station, holding the position twice, and the oldest woman ever to fly in space. She was also the only woman to have served as chief of NASA's male-dominated astronaut corps.

Fellow astronauts called her a "space ninja."

"It's been the greatest honor to live out my lifelong dream of being a @NASA Astronaut," Whitson said via Twitter, thanking "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!"

It’s been the greatest honor to live out my lifelong dream of being a @NASA Astronaut. Thank you to the #NASAVillage and 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! pic.twitter.com/F4Dzrud4yL — Peggy Whitson (@AstroPeggy) June 15, 2018

The 58-year-old biochemist, who grew up on an Iowa hog farm, joined NASA as a researcher in 1986 and became an astronaut in 1996. Her last spaceflight, spanning 2016 and 2017, lasted close to 10 months.

Only Russian men have spent more time in space: Gennady Padalka holds the record with 879 days over five missions.

NASA Administrator Jim Bridenstine called Whitson an inspiration, citing her determination and dedication to science, exploration and discovery.

"She set the highest standards for human spaceflight operations," Brian Kelly, director of flight operations at Johnson Space Center in Houston, said in a statement, "as well as being an outstanding role model for women and men in America and across the globe."

Before leaving the space station last September, Whitson said she would miss the orbiting outpost — an "awe-inspiring creation" — and the views from 250 miles up.

"I will miss seeing the enchantingly peaceful limb of our Earth from this vantage point. Until the end of my days, my eyes will search the horizon to see that curve," she said.