By Mark Trevelyan
RIO DE JANEIRO (Reuters) - Britain qualified fastest on Friday in the men's 4x100 meters medley relay, threatening to spoil the party for Michael Phelps when he swims the last race of his epic Olympic career on Saturday.
The British team of Chris Walker-Hebborn, Adam Peaty, James Guy and Duncan Scott won the first heat in 3 minutes 30.47 seconds, with Peaty making his first appearance since winning gold in the 100m breaststroke on Sunday.
The U.S. men won the second heat in 3:31.83 with David Plummer swimming backstroke, Kevin Cordes breaststroke, Tom Shields butterfly and Caeleb Dressel freestyle.
Phelps took the afternoon off, recovering from his exertions on Thursday night when he won the 200m individual medley to become the only swimmer to take gold in the same event at four consecutive Olympics.
Shortly after that swim, he raced again to qualify for Friday night's final of the 100m butterfly, in which he is also bidding for his fourth consecutive gold, and told reporters later: "My body is in pain."
Teams are allowed to rotate swimmers between the heats and finals of the relay events. Phelps, who after four gold medals this week now has 22 gold, two silver and two bronze medals (and counting), is expected to bid farewell on Saturday in the medley final, the climax of the Rio swimming program.
In the women's medley heats, the United States, Canada and Denmark qualified fastest, ahead of Russia and Australia.
(Reporting by Mark Trevelyan; Editing by Toby Davis)