Great Britain claimed a silver medal in the men's 4x100 medley relay as Michael Phelps bowed out of Olympic competition having claimed a 23rd career gold with the United States.

Adam Peaty, who won Britain's first Rio medal in the men's 100m breaststroke, James Guy, Chris Walker-Hebborn and Duncan Scott won another swimming medal for Team GB, finishing 2.71 seconds off the USA.

Australia finished in third to claim the bronze medal.

But it was Phelps who grabbed the headlines again alongside Ryan Murphy, Cody Miller and Nathan Adrian, setting a new Olympic record of 3:27.95.

Murphy also broke the world record for the 100m backstroke in his leg of the race.

Peaty's breaststroke was pivotal for Team GB, helping them taking an early lead having also started the race as fastest qualifiers. But when Phelps took over in the butterfly, he drove past Guy to hand the US a commanding lead, with Adrian holding off Scott to clinch gold.

Ryan Murphy, Cody Miller, Michael Phelps and Nathan Adrian
Ryan Murphy, Cody Miller, Michael Phelps and Nathan Adrian of the United States celebrate on the podium. Getty

The United States have now won 33 medals in swimming events in Rio, their greatest haul since Sydney 2000. Phelps, who has won five golds and one silver this summer, insists he will not compete in Tokyo in four years' time.

"I'm not going four more years and I'm standing by that," he said. "I've been able to do everything I've ever put my mind to in the sport. I'm happy with how things finished.

"I swore in London I wasn't coming back and this is final. Were the papers here, I'd sign them tomorrow."