WASHINGTON — After spending nearly a year in space, astronaut Scott Kelly is hanging up his spacesuit.

NASA announced Kelly’s retirement Friday, less than two weeks after he returned to Earth. He’s leaving the space agency April 1.

The 52-year-old Kelly spent a U.S.-record 340 days in orbit on the International Space Station to see how the human body holds up for long periods of time in space. His results are being compared to those on the ground from his twin brother, Mark, who is a retired astronaut. Scott Kelly also holds the American record for most time in space: 520 days over four missions.

During his one-year trip, Scott Kelly posted hundreds of images, mostly of Earth from orbit, on social media. But he also engaged in a little fun, donning a gorilla suit that was a gag gift from his brother and chasing fellow astronauts through the space station in a video.

“This year-in-space mission was a profound challenge for all involved, and it gave me a unique perspective and a lot of time to reflect on what my next step should be on our continued journey to help further our capabilities in space and on Earth,” Kelly said in a statement.

Kelly’s departure means the space agency is losing its biggest star, said John Logsdon, a retired space policy professor.

“I’m willing to bet that no one could name another NASA astronaut, anyone not close to the program,” Logsdon said. “It clears the way for the next generation of space fliers. There are a few veteran fliers left, but not many.”