Kelly's first spaceflight was as pilot of during STS-103 in December 1999. This was the third servicing mission to the Hubble Space Telescope, and lasted for just under eight days. Kelly's second spaceflight was as mission commander of STS-118, a 12-day Space Shuttle mission to the ISS in August 2007. Kelly's third spaceflight was as a crewmember on Expedition 25/26 on the ISS. He arrived at the ISS aboard Soyuz TMA-01M on 9 October 2010, and served as a flight engineer until he took over command of the station on 25 November 2010 at the start of Expedition 26.