The 31-year-old, making his first competitive appearance in the pool at his fifth Games after sitting out the heats, now has an unprecedented 23 medals with two silvers and two bronzes filling out his tally.

London 2012 champions France took the silver medal and Australia the bronze. With baby son Boomer in the audience for the first time at an Olympics, Phelps swam the second leg of a race that has brought him four of his medals over the years including gold in Beijing in 2008.

The most decorated Olympian of all time has now won gold at four separate Games, the first swimmer to do so.

The U.S. team set a world record of three minutes, 8.24 seconds in that bodysuit-era race that still stands and is likely to endure for some time to come.

On Sunday the came closer than anyone has ever done wearing textile suits, when the quartet of Caeleb Dressel, Phelps, Ryan Held and 100m freestyle world champion Nathan Adrian clocked 3:09.92.

Dressel completed his opening leg just two hundredths behind the French in 48.10 and Phelps made the difference, taking the lead off a strong turn and clocking out at 47.12 with Held putting in a 47.73 and Adrian fastest of all in 46.97.

As he has done so many times in the past, Phelps kissed the medal on the podium and waved at the crowd with tears in his eyes and a supportive arm for Held and Dressel who were collecting the first Olympic medals of their careers.

The 35-year-old Anthony Ervin, who won 4x100 relay silver in 2000, swum in the heats to collect another medal 16 years after his first.

Jimmy Feigen and Blake Pieroni also swim the heats. The victory maintained a run of U.S. success in the event, with the Americans medalling in every 4x100 freestyle relay raced at the Games since it was first included in 1964.

Latest News from Sports News Desk