American swimmer Gretchen Walsh said she was devastated when she heard her sister Alex had been disqualified in the 200m individual medley on Saturday, dedicating her U.S. gold in the mixed 4x100m medley relay to her elder sibling.

Alex Walsh, the 2021 silver medalist, had touched the wall third in her event behind Canada's Summer McIntosh and American compatriot Kate Douglass.

But she was then disqualified for an illegal turn at the end of her backstroke leg, handing Australian Kaylee McKeown the bronze medal.

"I'm just devastated. I think that Alex deserves so much," Gretchen told reporters after the U.S. won gold in the relay.

"She's worked so hard and I don't really know how to put that into words. It's really sad, but I know that she'll be back and better than ever."

Gretchen was warming up for the relay, the last event of the night, when she heard the news. Although it came as a shock, she used it as fuel to fire her up, as the Americans broke the world record in the mixed 4x100m medley relay final.

"I did watch the race, I was really happy for her. When I saw she touched third, I was thrilled that she was on the podium," Gretchen added.

"Then I did one more 50 of warm down and then it was a DQ. I was just stopped in the middle of the pool, so upset.

"I don't really know how to describe it. I knew that I was going to have to move on from that quickly in the moment and give her a big hug, tell her that I'm here for her. And then go out and do this (win the mixed relay) in her honor."

The U.S. time of three minutes and 37.43 seconds shaved 0.15 seconds off the world record set by Great Britain at the Tokyo Olympics.

It was only the second world record set in the pool at Paris's La Defense Arena after China's Pan Zhanle, who won gold in the men's 100m freestyle.

Why did Alex Walsh get disqualified?

Walsh's would-be bronze-medal-winning time was nullified after it was determined that she made an illegal turn, transitioning from the backstroke portion to the breaststroke.

The USA Swimming rule book states that on this specific turn, "The swimmer must touch the wall while on the back. Once a legal touch has been made, the swimmer may turn in any manner but the shoulders must be at or past the vertical toward the breast when the swimmer leaves the wall and the prescribed breaststroke form must be attained prior to the first arm stroke."

It was ruled that Walsh rotated too far onto her stomach before completing the backstroke leg, resulting in a disqualification that NBC swimming analyst Rowdy Gaines said seemed to him like "the right call."

Reuters contributed to this story.