Combined with his other three trips to space, Mr. Kelly has now spent 540 days of his life in orbit. The 340-day stay far surpassed the previous American record — 215 days — set by Michael López-Alegría in 2006 and 2007. The international record is nearly 438 days, set by the Russian cosmonaut Valeri Polyakov on the Mir space station in 1994 and 1995.

“I could go another year if I had to,” Mr. Kelly said last week in a wide-ranging news conference. He was looking forward to jumping in his pool, he said, adding that the hardest part was being away from friends and family.

But Mr. Kelly managed to maintained a sense of levity, including dressing up in a gorilla suit. Highlights of the trip included a spacewalk and enjoying the first lettuce grown and harvested in space.

“Kind of like arugula,” Mr. Kelly said.