Plus, Kelly’s high name recognition and the general good will he has accumulated in the wake of the January assassination attempt on Giffords would likely overcome any questions about his residency.

He gave the only hints to his future plans on his Facebook page Tuesday, where he wrote that he wanted to be there for Giffords during her recovery but added he hopes “that one day I will again serve our country.”

“Gabrielle is working hard every day on her mission of recovery,” he wrote. “I want to be by her side. Stepping aside from my work in the Navy and at NASA will allow me to be with her and with my two daughters. I love them all very much and there is no doubt that we will move forward together.”

Giffords’s office staff spread the news on her Twitter page, tweeting to her followers, “Thank you for your service Mark!” 

Kelly recently piloted the final flight of the Space Shuttle Endeavour. Giffords made her first public appearance since the assassination attempt to watch the shuttle’s liftoff. 

The congresswoman was released from a Houston hospital last week, moving into a home Kelly has there. She and Kelly visited Tucson, Ariz., the site of the shooting, over the weekend.

Moments after Kelly announced his retirement Tuesday, book publisher Scribner announced it had signed a deal to publish a book co-authored by Kelly and Giffords. The memoir is set to detail the early phases of the couple’s relationship, as well as how they’ve been affected by the Jan. 8 shooting.

It will be published at a yet-to-be-determined date.

Daniel Strauss and Emily Goodin contributed.