The millionth finisher in the history of the annual race, first held in 1981, has crossed the line on The Mall.
One runner collapsed at mile 23 (37km) near Southwark Bridge in cardiac arrest and was taken to St Thomas' Hospital.
Maj Peake completed his own marathon - 26.2 miles (42km) - but on a treadmill aboard the International Space Station.
Maj Peake recorded a message wishing the competitors good luck, before ending with the 10-second countdown, which was shown to the runners on a big screen.
He completed his marathon distance on a treadmill in space in about three hours and 35 minutes, the European Space Agency said.
London Marathon 2016: In Pictures
The men's wheelchair race was won by defending champion Marcel Hug from Switzerland. Britain's David Weir came third.
Tatyana McFadden from the US won the women's elite wheelchair race.
Jemima Sumgong - who fell at a drink station earlier in the race - pulled clear of Ethiopia's Tigist Tufa to win the women's elite race for Kenya.
Eliud Kipchoge won the men's elite race in a new course record of two hours, three minutes and four seconds - about seven seconds outside the world record.
Prince Harry, patron of the London Marathon Charitable Trust, presented the winners' prizes.
Double Olympic champion Dame Kelly Holmes, former rugby union international Shane Williams, Games of Thrones actress Natalie Dormer and Birmingham City manager Gary Rowett were among the famous participants.
Other celebrities taking part included Radio Two's Chris Evans, The Only Way is Essex's Bobby Norris and TV personality Judge Rinder.
One runner, Christopher Barton, proposed to his girlfriend who was in the crowd of spectators at Tower Bridge.
At least four "Shakespeares" were registered to run the course to mark 400 years since the Bard's death, alongside running hot dogs, dinosaurs and Disney princesses.
Bedford grandmother Iva Barr, aged 88, was the oldest competitor in this year's race. She has been running marathons for about 30 years and took part in the first race in 1981.
She made it past halfway but stopped near Canary Wharf. A spokesman for the charity Whizz-Kidz said she was fine but was unable to complete the rest of the course and had been taken home by her family.
There was another happy ending too for a runner who popped the question on the finish line, London Marathon organisers said.
The course takes in many of the capital's landmarks and predominantly follows the route of the River Thames.
Road closures were expected to be in place from 07:00 until 19:00 in some places.
For live travel updates visit the BBC London travel page or follow @BBCTravelAlert.
Live coverage of the event has now ended. You can relive it all on iPlayer or here.
Almost 40,000 runners have taken part in the 36th London Marathon after Major Tim Peake provided a countdown from space to start the mass race.