Three weeks after landing the Space Shuttle Endeavour at the end of its final voyage, Captain Mark Kelly said he'll be retiring from NASA and the U.S. Navy to be with his wife, U.S. Rep. Gabrielle Giffords, D-Arizona, as she recovers from gunshot wounds suffered in January, Reuters reported.

As life takes unexpected turns we frequently come to a crossroads, Kelly wrote in a post on Facebook. I am at this point today. Gabrielle is working hard every day on her mission of recovery. 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.

Giffords returned to her home for the first time last week since the shooting that claimed the lives of six and severely injured her on January 8.

Kelly said his retirement from the Navy and NASA would take effect October 1.

I know that as our space program evolves, there are those who will question NASA's future. I am not among them. There isn't a group more dedicated to its mission or more capable than the outstanding men and women of NASA. Exploration is a critical component of what makes our country great. We will continue to explore and NASA will continue to lead that effort, Kelly wrote.