HOUSTON -- Shalane Flanagan and Kara Goucher finished in the top three at Saturday's 2012 U.S. Olympic Marathon Trials to earn spots in London, while fellow Oregon-based runner Dathan Ritzenhein suffered a heartbreaker despite running the fastest marathon of his life.

The top three male and female finishers will compete in this summer's London Olympic Games.

Flanagan broke the trials record with a time of 2 hours, 25 minutes, 38 seconds, more than three minutes faster than her personal best. Flanagan, 30, trains with the Oregon Track Club/Elite Portland and won the race by 17 seconds over second-place finisher Desiree Davila (2:25.55) of Michigan. She will compete in the Olympics for the second time after taking bronze in the 10,000 meters in Beijing.

"That last mile was a cross between savoring the moment and being incredibly happy to be done," Flanagan said. "I'm just incredibly proud to be on the same team with these women."

Goucher, Flanagan's OTC teammate, took the final qualifying spot with a time of 2:26.06. Goucher, 33, edged fourth-place finisher Amy Hastings by 11 seconds to earn her second trip to the Olympics. She finished 10th in the 10,000 meters at the 2008 Games and gave birth to a baby boy less than 16 months ago.

"I never imagined myself winning this race based on the short period of time I had to train," Goucher said before giving credit to her teammate, Flanagan. "But honestly, today I just kind of sat on her shoulder just like in practice."

Ritzenhein fell less than eight seconds short of making the cut. The 29-year-old took fourth with a time of 2:09.55, just behind third-place finisher Abdi Abdirahman of Arizona.

"I started to check off late and those three got away," said Ritzenhein, who led for many of the middle phases of the race. "I started to gain late but didn't have enough time to catch up."

Meb Keflezighi, 36, of California, won the race with a time of 2:09.08, Ryan Hall, 29, of California, ran 2:09.30 to take second, and Abdirahman was the final qualifier at 2:09.47.

After crossing the finish line, Ritzenhein crouched and buried his face in his hands in disappointment. Ritzenhein, who races for the Oregon Project and finished ninth in the 2008 Beijing marathon, dealt with foot injuries and infections for much of 2011. He was reportedly 100 percent healthy entering this weekend but was plagued by hamstring spasms beginning in Mile 17.

He said he would now focus his attention on the track and trying to qualify for the 10,000 meters, but hasn't given up on the marathon.

"My hat's off to Dathan," Hall said. "He ran really tough and was out there by himself for much of the race. I'm looking forward to seeing what he does on the track because he's got some good stuff."

Saturday's race marked the first time four Americans finished under the 2:10 mark, a positive sign for country's surging field of distance runners. Keflezighi became the oldest winner of the trials and will return to the Olympics for the third time.

"Today was not about being first, second or third," Keflezighi said. "It's all about being on the team, and it's an honor to be able to go to London."