Entering the Summer Games, runners from Kenya and Ethiopia had accounted for the 33 best marathon times of the year and the 10 fastest times ever. So strong are the two countries’ distance runners that in Kenya alone, 278 runners had clocked the qualifying “A standard” for this year's Olympics.

Yet after the men’s marathon had wound past Buckingham Palace and through the shadows of Big Ben’s tower, a relatively unknown Ugandan named Stephen Kiprotich, owner of only the world’s 53rd-best marathon time of the year, had distanced himself from the pack.

Kiprotich won the men’s marathon Sunday, earning Uganda its first Olympic medal since 1996 and only its second gold ever.

“Today I joined the champions,” he said, “so I am happy.”

Kiprotich won with a time of 2 hours 8 minutes 1 second, well ahead of silver medalist Abel Kirui (2:08:27) and third-place finisher Wilson Kipsang Kiprotich (2:09:37), both of Kenya.

Four years ago, Kenya and Ethiopia combined to win eight of the nine medals in the men’s marathon, 5,000- and 10,000 meter races, including all three golds. (The 2008 Olympic champion marathon champion, Kenyan Samuel Wanjiru, died after falling off a balcony following a domestic dispute last year.) In London, the two countries didn’t claim any of the golds, and won five men’s distance medals overall.

“It is not good that we lost the gold medal,” Kenya’s Kiprotich said, “but to get silver and bronze is still a major achievement.”

The lone American to finish the race was 37-year old Meb Keflezighi, a three-time Olympian who finished fourth in 2:11:06. A silver medalist from the 2004 Olympics, Keflezighi made a late charge but still finished more than three minutes behind the winner.

“Did I want to finish fourth? No,” he said. “But at the Olympic Games, I’ll take it.”

Keflezighi was born in the African nation of Eritrea but has lived in the United States since he was 12. He missed two months of training this year because of a foot infection but still seemed pleased with his performance Sunday. It was what happened before the race that bothered him.

Because there are more than 100 runners competing, race organizers introduced fewer than 10 to the crowd. With an Olympic medal and a New York City Marathon title on his race résumé, Keflezighi said he should have been formally introduced.

“I was very upset,” he said. “Shame on [International Association of Athletics Federations] on that one. . . . None of those guys have what I have. To not be introduced like that definitely hurts.”

His U.S. teammates, Ryan Hall and Abdihakem Abdirahman dropped out of Sunday’s race after about 10 miles. Hall, the 10th-place finisher at the Beijing Games, appeared to grab the back of his leg as he left the course and later said he had hurt his hamstring.

“It’s a real bummer to have such a bad day when it’s such an amazing atmosphere out there,” Hall said. ”There was the potential to do something really special today.”

Abdirahman, a four-time Olympian, barely made it 100 yards past Hall before he, too, pulled up. The pain in his knee had become too much, he said.

“It was the hardest thing to do. At the same time I didn’t want to push hard and I didn’t want to take the risk because of the pain I was feeling in my leg,” he said. “The best thing was to shut it down and drop out.”

Kenya’s Kiprotich was in front for most of the race’s first half, leading at one point by nearly 20 seconds. About 161 / 2 miles in, as he approached Big Ben on the race course, Kiprotich was joined by fellow Kenyan Kirui and Uganda’s Kiprotich, and the trio ran neck and neck.

With about four miles remaining, Kenya’s Kiprotich fell slightly behind the Ugandan and Kirui. Less than a mile later, Uganda’s Kiprotich pulled slightly ahead and took possession of the lead.

“The pace was too fast and I knew I could not run away from them, so I just had to keep up with them,” the Ugandan said. “I tried to settle and then I had to break away because I wanted to win this medal.”

There were 105 runners from 68 countries in Sunday’s race, but many of the world’s top marathon runners could not participate. Nations such as Ethiopia and Kenya feature many of the fastest runners but could send just three apiece to London. In fact, the world record holder, Kenyan Patrick Makau Musyoki stayed home because he was not selected by his country’s Olympic committee to compete here.

Uganda, meanwhile, won its first medal since 1996. The country has competed in the Olympics since 1956 but had won only six medals in that time. Its lone gold before Sunday came in 1972 in the 400-meter hurdles.

Running unaffiliated with any country, Guor Marial, who lives and trains in Flagstaff, Ariz., finished 47th out of the 85 finishers in a time of 2:19:32. Because South Sudan, a year-old nation, has yet to organize an Olympic committee, Marial learned less than three weeks ago that he’d be able to compete under the International Olympic Committee’s banner, which wasn’t enough time, he said, to properly prepare for such a competitive race.

Marial said he wasn’t racing for a medal Sunday as much as he was trying to honor “the supporters, the refugees and the people of South Sudan.

“That’s the reason I came here to run.”