On July 28, 2012, Phelps placed eighth in the morning prelims for the 400-meter individual medley. Phelps, the two-time defending Olympic champion, won his heat in 4 minutes, 13.33 seconds with a time that was well off his world record of 4:03.84 set four years earlier in Beijing, when Phelps won a record eight gold medals. He out-touched László Cseh by 0.07 seconds in his heat to qualify last for the final, locking out Cseh. In his first finals of the Summer Olympics, Phelps placed fourth behind fellow American Ryan Lochte, Thiago Pereira of Brazil, and Kosuke Hagino of Japan in the 400-meter individual medley. It was the first time Phelps failed to medal in an Olympic event since 2000. The next night, in his second event of the Games, he got a silver as a member of the 4×100-meter free relay. Phelps swam the fastest leg of the US relay team and the second-fastest of anyone in the race.