LONDON — Stephen Kiprotich rounded a corner late in the race and simply took off. A surprise surge from a surprise winner.

So swift and unexpected was his move that the runner from Uganda turned the last mile into a victory lap as he easily captured the Olympic marathon Sunday, along with the first medal for his country at the London Games.

Kiprotich finished in 2 hours, 8 minutes, 1 second, holding off the Kenyan duo of Abel Kirui and Wilson Kipsang. Kirui finished 26 seconds behind Kiprotich, while Kipsang, the leader much of the race, faded late but held on for bronze just ahead of American Meb Keflezighi.

On an extremely warm afternoon, the marathoners wound their way through a scenic route packed with swarms of fans. Kiprotich had such a big lead near the finish that he grabbed a flag from the stands and wore it on his way to the finish.

After finishing, he dropped to his knees, bowed and then raised his hands high over his head.

The Kenyans, who were looking at a possible podium sweep, just couldn’t keep up. Kirui and Kipsang were competing in memory of the late Sammy Wanjiru, who won the country’s first Olympic marathon crown four years ago in Beijing. Wanjiru died last year after a fall from a second-story balcony during a domestic dispute.

Kipsang – who was listed by his full name of Wilson Kiprotich Kipsang for the race – was seemingly in control early in the day. He was out front and running all alone, before fading back to the pack. Kirui caught up with him while Kiprotich followed just behind.

At the 23-mile mark, Kiprotich turned the corner and was gone. No one could catch him as he won only the third medal ever for Uganda in track and field and the first since 1996.

Kiprotich sure had plenty of crowd support. Spectators lined the course 10 rows deep in some sections, waving signs and ringing cowbells.

The runners took in the sights, breezing past Big Ben, St. Paul’s Cathedral, Trafalgar Square, London Bridge and the Tower of London before finishing near Buckingham Palace.

The weather was ideal – at least for the spectators.

It was bright and sunny but grew hot, especially late in the race – quite a contrast to the women’s race last Sunday that began in a steady downpour.

While other runners wore the colors of their countries, Guor Marial donned a predominantly gray and black uniform with “I.O.A.” printed on it. He wound up 47th, 11:31 behind the winning time.

Marial competed as an independent runner under the banner of the International Olympic Committee after fleeing a refugee camp in what is now South Sudan during a civil war more than a decade ago.

The 28-year-old landed in the United States, seeking asylum. The IOC cleared him last month to compete in the Olympics as an independent athlete after he didn’t qualify for Sudan, South Sudan or the United States under its rules.

Marial had run only two marathons in his life, but finished both in Olympic times. His second was just two months ago in San Diego.

“I was not able to get them a medal today, but the finish was the most important,” Marial said. “I felt like the world was watching.”

Within seconds of each other, U.S. marathoners Ryan Hall and Abdi Abdirahman were out of the Olympic race.

First, Hall, a medal favorite, dropped out around the 11-mile mark with a tight right hamstring. Then, Abdirahman called it a day because of an aching right knee.

“I felt like I was favoring my stride and didn’t want to get injured,” said Hall, who lives in Flagstaff, Ariz.

Keflezighi, of Mammoth Lakes, Calif., used a strong finish to make up ground and finish fourth. He won silver at the Athens Games eight years ago.

“Fourth is not the place I wanted to finish. But fourth in the world? I’ll take it,” he said.