When it was over, Michael Phelps hugged his teammates, then headed off the deck for the final time.

Reclaiming the lead with his trademark butterfly stroke, Phelps won the 18th gold of an unparalleled career when he helped the U.S. win the 4x100-meter medley relay Saturday night.

Phelps retires with twice as many golds as any other Olympian, and his total of 22 medals is easily the best mark, too.

“It’s been a great career,” he said. “It’s been a great journey. I can’t be any more happy than I am.”

The U.S. women also won the medley relay on swimming’s final night at the games, setting a world record in the final. Ranomi Kromowidjojo of the Netherlands took the women’s 50-meter freestyle to complete a sweep of the sprints, and China’s Sun Yang lowered his own world record while winning the men’s 1,500 freestyle.

Britain’s banner day stretched from Dorney Lake to Olympic Stadium, which opened with Oscar Pistorius’ debut and ended with a crowd-pleasing performance by the home team.

How to describe the action in track and field? The Blade Runner and Britannia. Jamaica also got a big victory when Shelly-Ann Fraser-Pryce raced to another gold in the women’s 100 meters, keeping the cherished sprinting title in the Caribbean country.

Pistorius, a double-amputee who runs on carbon-fiber blades, finished second in his 400-meter heat to earn a berth in the semifinals Sunday night. He posted a season-best time of 45.44 seconds.

“I’ve worked for six years ... to get my chance,” said the South African, who became the first amputee to compete on the track at an Olympics. “I found myself smiling in the starting block. Which is very rare in the 400 meters.”

The U.S. men’s basketball team was pushed — and then some.

Two days after running and gunning to a record-shattering 83-point win, the United States needed a strong finish from LeBron James to eke out a 99-94 victory over Lithuania.

The Americans trailed 84-82 with 5:50 to play, but James scored nine of his 20 points in the final four minutes to help the U.S. remain unbeaten.