British astronaut Tim Peake has completed the London Marathon — from 250 miles (400 kilometers) above the Earth.

Peake ran the 26.2-mile (42-kilometer) race harnessed to a treadmill aboard the International Space Station, with a simulation of the route through London's streets playing on an iPad.

He finished in 3 hours and 35 minutes. Guinness World Records says that's a record for the fastest marathon in orbit. American astronaut Sunita Williams ran the Boston Marathon from space in 2007 in 4 hours and 24 minutes.

Peake, who is four months into a six-month stay aboard the space station, also sent competitors a good luck video message before Sunday's race.

The 44-year-old astronaut was one of more than 39,000 people running the marathon — the rest at ground level.