He was one of the seven-person crew that conducted microgravity research aboard the space shuttle Columbia during a 16-day flight in April–May 1998. He was also in the crew on Atlantis that prepared the International Space Station in February 2000 for the first resident crew, and flew as mission commander on Columbia in 2002 and on Atlantis in 2009 (the fifth and final space shuttle mission to the Hubble Space Telescope). He was selected as an astronaut in 1994 and logged more than 51 days in space. Following two years as Shuttle Branch Chief for the Astronaut Office, he was assigned on temporary duty to NASA Headquarters as deputy director, Requirements Division, of the Exploration Systems Mission Directorate. He then returned to Houston, where he served as the chief of the Exploration Branch of the Astronaut Office before retiring from NASA in September 2010.