By KAREN CROUSE, The New York Times — LONDON — The excitement of winning the United States’ first gold medal of the London Games kept Ryan Lochte awake until 2 a.m., which was a bit of a worry since he had the heats of the 200-meter freestyle on Sunday morning.

Less than 12 hours after leaving the London Aquatics Centre, Lochte was back in the water on Sunday morning racing Sun Yang of China. Sun also had reason to feel sluggish after beating the defending Olympic champion Park Tae-hwan in the 400-meter freestyle shortly after Lochte dethroned the two-time defending champion Michael Phelps in the 400-meter individual medley.

Swimming in the same heat, Sun was timed in 1 minute 46.24 seconds to Lochte’s 1:46.45. They were the top two qualifiers. Yannick Agnel of France, who has the fastest time in the world this year, was third, Park was fifth and the American Ricky Berens was eighth. The 16-man semifinal is Sunday night.

“I just wanted to get a lane for tonight,” Lochte said. “I think the 400 I.M. took a lot out of me last night. But, you know, it’s a new day, a new race and I did what I had to do this morning and I hope I go a little faster tonight.”