Swimming Encinitas
Michael Andre hugs Caeleb Dressel after their relay win. Photo credit: Screen shot, @USASwimming, via Twitter

Michael Andrew of Encinitas will come home as an Olympic gold medalist in swimming.

In his final individual appearance, Andrew finished fourth behind teammate Caeleb Dressel, who set an Olympic record, 21.07 seconds, in the 50m freestyle.

Florent Manaudou of France won silver in 21.55, while Brazil’s Bruno Fratus took the bronze in 21.57. Andrew’s time was 21.6.

But then came his relay win.

The U.S. team, with Andrew, Dressel, Ryan Murphy and Zach Apple, set a world record in the men’s 4X100-meter medley relay – 03:26.78. They broke the previous record of 3:27.28 set by the U.S. in 2009.

In doing so, Dressel won his fifth gold medal in Tokyo. It was Andrew’s first.

Great Britain captured the relay silver in 03:27:51, setting a European record, and Italy the bronze with 03:29.17.

Tina Andrew told NBC San Diego that she is “super, super excited” about the world record. Her son, who is returning Monday, she said, is already thinking about Paris, where the Olympics will be held in 2024.

Another Southern Californian, Tom Shields of Huntington Beach, won gold in the relay, since he swam the butterfly leg in Friday’s heat. Under Olympic rules, swimmers in relay heats receive medals.

Shields, 30, also won a gold medal at the 2016 Rio Games for swimming a 4X100-meter medley relay heat.

City News Service contributed to this report.