At the Summer Olympic Trials held in Eugene, Flanagan competed in both the 5000 and 10,000 m. She won the 10,000 m final in a time of 31:34.81. This guaranteed her a spot on Team USA for Beijing. Flanagan also finished third in the 5000 m final with a time of 15:02.81. On August 16, Flanagan finished third in the Olympic 10,000 m finals in Beijing, capturing the bronze medal (later upgraded to silver). It was later upgraded to silver after Turkish runner Elvan Abeylegesse tested positive for a banned substance. Flanagan also set a then American record in 30:22.22, shattering her own record set earlier in the year. She is only the second American woman to receive an Olympic medal in the 10,000 m.