The United States broke the world record to win the men’s 4x100 meters medley relay at the Athens Olympics yesterday and allow Michael Phelps to match Soviet gymnast Alexander Dityatin’s 1980 record for the most medals at one Games. The 19-year-old American did not swim the final, the last swimming race at the Games, after giving up his spot to Ian Crocker but still gets a medal because he contested the heats, giving him a total of eight for the week, including six gold.

Crocker, swimming butterfly, teamed up with backstroker Aaron Peirsol, breaststroker Brendan Hansen and freestyle anchorman Jason Lezak to finish first in three minutes 30.68 seconds, 0.86 inside the previous world record the US set at last year’s World Championships.

Peirsol also broke the individual world record for 100 backstroke, clocking 53.45 seconds on the opening leg to beat the previous mark of 53.60 set by his compatriot Lenny Krayzelburg five years ago.

“It is the last race of the Olympics and we won it with a world record,” said Hansen. “People will always remember that. We are strong, we are proud, we are happy to win.”

A quarter of an hour earlier, Australia broke the world record in the women’s medley relay to give Jodie Henry and Petria Thomas their third golds of the Games.

Henry and Thomas teamed up with backstroker Giaan Rooney and breaststroker Leisel Jones to win gold in a time of 3:57.32 seconds, wiping almost a full second off the previous record of 3:58.30 set by the US at the last Olympics.

The US finished with the silver in a time of 3:59.12 after leading for the first 250 meters while the bronze went to Germany in 4:00.72.

Jenny Thompson, swimming the butterfly leg for the Americans, collected her 12th medal, the most by any swimmer, in her fourth Olympics. The previous record of 11 was jointly held by her compatriots Mark Spitz and Matt Biondi. The 31-year-old confirmed that Athens would be her final Games.

“It’s been a long career of hard work, fun and amazing people,” she said. “Now I might sit back and appreciate the medals.”

The US topped the gold medal count in swimming with 12 ahead of Australia with seven and Japan with three.

Grant Hackett, unbeaten for seven years over 1,500 freestyle, won the longest and most grueling event on the swimming program for the second time as Australia won two of the four titles on the final night of swimming.

Hackett led all the way to win in 14:43.40 seconds but only after winning a last-lap sprint with American Larsen Jensen, who cut the margin to less than a fifth of a second with 100 to go.

Hackett pulled away to win by three meters at the end with Jensen holding on for second and Briton David Davies third in a European record time of 14:45.95. “It was as hard as any race that I’ve done,” said Hackett. “I haven’t been pushed like that before.”

Hackett also won the 1,500 gold in Sydney and joins Mike Burton (1968, 1972), Vladimir Salnikov (1980, 1988) and Kieren Perkins (1992, 1996) as the only men to win the event twice.

Inge de Bruijn, who had lost two of the three Olympic titles she won in 2000, saved her best for last to retain the 50 freestyle crown three days before her 31st birthday. The Dutchwoman sprinted down the Athens pool in 24.58 to become the first woman to retain the Olympic 50 freestyle title, which was introduced in 1988.

“It’s an amazing feeling,” said de Bruijn. “A gold on the last day of the program, what a climax. It’s unbelievable how it feels, I can’t find the words to express it.”

Malia Metella of France snatched the silver in 24.89 while Libby Lenton, who lost her 100 freestyle world record to Henry and failed to make that final, gained compensation with the bronze in 24.91.