PARIS -- The U.S. women's basketball team held off France on Sunday to win gold in the final event of the Paris Olympics, and that hardware was needed for the Americans to tie China for the most gold medals with 40.
The U.S. easily won the total medal count with 126. Aside from the 40 gold, the Americans won 42 silver and 44 bronze.
"I saw the medal count beforehand, so I knew," said U.S. women's coach Cheryl Reeve, who said she thought to herself, "That's what we need -- more pressure."
The U.S. lost a bronze medal Sunday when the International Olympic Committee said it was reallocating the bronze given to Jordan Chiles in the women's floor final to Romanian Ana Barbosu. U.S. Olympic officials are appealing.
China came in second in the total medal race with 91, winning 27 silver and 24 bronze. Japan was a distant third with 20 gold medals, 45 overall. Great Britain won 65 medals, but only 14 were gold for an overall ranking of seventh.
The last time the U.S. didn't top the standings in gold medals was at the Beijing Olympics in 2008, when the Americans finished second to China, 48-36.
The U.S. has won the most overall medals in eight consecutive Summer Games. The last time the Americans failed to top the medal leaderboard was the Barcelona Olympics in 1992. The "Unified Team" featuring athletes from ex-Soviet republics won both the most golds (45) and total medals (112), while the Americans were second in both categories with 37 golds and 108 medals.
The U.S. had been battling with China for the lead in gold medals the past several days and entered Sunday, the final day of competition, trailing China 39-38.
China picked up an early gold medal Sunday when Li Wenwen won the top medal in women's +81kg weightlifting. The U.S. followed with a gold when Jennifer Valente defended her women's omnium title in cycling track.
It then came down to women's basketball, where the U.S. won gold for the eighth consecutive Games.
The United States won a total of five medals on Sunday, including a silver in women's freestyle 76kg (wrestling), a team silver in women's volleyball and a bronze in men's water polo.
Three years ago at the Tokyo Olympics, the U.S. beat China with 39 gold medals to 38. The U.S. won 113 overall medals in Tokyo. The Americans were far more dominant at the Rio Olympics in 2016, when they won 46 gold medals to 27 for Great Britain and 26 for China.