CAPE CANAVERAL, Fla. — Astronaut Scott Kelly closed the door Tuesday to an unprecedented year in space for NASA, flying back to the planet and loved ones he left behind last March.

Kelly and his roommate for the past 340 days, Russian cosmonaut Mikhail Kornienko, checked out of the International Space Station on Tuesday night, U.S. time.

By the time their capsule lands in Kazakhstan early Wednesday, the pair will have traveled 144 million miles through space, circled the world 5,440 times and experienced 10,880 orbital sunrises and sunsets.

Kelly photographed the first five sunrises of his waking day Tuesday, posting the pictures on Twitter, before quipping, “I gotta go!” His final tweet from orbit came several hours later: “The journey isn’t over. Follow me as I rediscover (hash)Earth!”

Piloting the Soyuz capsule home for Kelly, 52, and Kornienko, 55, was the much fresher and decade younger cosmonaut Sergey Volkov, whose space station stint lasted the typical six months.

Kelly was the first one into the docked Soyuz capsule after a round of hugs and handshakes with the three crewmen staying behind. Kornienko reached out and patted the inside of the station before the hatches swung shut. A few hours later, the Soyuz undocked and aimed for the barren steppes of Kazakhstan as calls of “Godspeed” filled the Twitterverse.

The two yearlong spacemen will undergo a series of medical tests following touchdown. Before committing to even longer Mars missions, NASA wants to know the limits of the human body for a year, minus gravity.

As he relinquished command of the space station Monday, Kelly noted that he and Kornienko “have been up here for a really, really long time” and have been jokingly telling one another, “We did it!” and “We made it!”

“A year now seems longer than I thought it would be,” Kelly confided a couple weeks ago.

Not quite a year – 340 days to be precise, based on the Russian launch and landing schedule. But still record-smashing for NASA.

Kelly’s closest U.S. contender trails him by 125 days. Russia continues to rule, however, when it comes to long-duration spaceflight. The world record of 438 days was set by a Russian doctor during the mid-1990s.

“A really smart person said to me one time, `Teamwork makes the dreamwork in spaceflight,’ and spaceflight is the biggest team sport there is,” Kelly said Monday.