By the time Richard Torrez Jr. was set to take the ring for a super heavyweight final, the Americans had already clinched the most golds. PHOTO: REUTERS

The United States has won the most medals at the Tokyo Olympics and will be the only country to take home more than 100.

But on the last day of competition, the race for the most gold medals was a tight contest between the United States and China.

That race is particularly important to China, which has tried to harness its youth for Olympic glory ever since rejoining the summer Olympic movement in 1984.

With just a few events left, the United States clinched the race Sunday (Aug 8) afternoon by reaching 39 golds.

As the day began in Tokyo, China had 38 gold medals to 36 for the United States.

But American teams then won gold medals in women's basketball and women's volleyball, and Jennifer Valente won the women's omnium in track cycling, putting the United States into the lead by one

China had two opportunities for golds, but finished fourth in the rhythmic gymnastics group all-around final and with a silver in women's middleweight boxing.

By the time boxer Richard Torrez Jr. of the United States was set to take the ring for a super heavyweight final, the Americans had already clinched the most golds.

To establish itself as a sports superpower, China's government decades ago developed an official "gold medal strategy" that depended on thousands of full-time sports schools, with coaches scouting young talent in villages and cities alike.

In addition to traditional strongholds like table tennis and badminton, Chinese officials deliberately targeted sports that were underfunded in the West, such as women's sports, or less high-profile pursuits with many medals on offer from multiple weight divisions or event categories.

It mattered little whether there was deep public interest in these sports in China. Sports schools started programs from scratch in women's weightlifting, taekwondo, canoeing and more.

On home turf in 2008, China met its ambitions by topping the gold medal count for the first time.

But the country slipped in London in 2012 and Rio de Janeiro in 2016, amid public reservations about whether the sports system was worth it.

Few children make it to the elite level, and even those that do are not guaranteed good jobs after they retire.

Even as government officials stressed that they wanted to encourage mass sports and overall physical fitness, the drive for gold continued.

It paid off in Tokyo. China scored golds in the sports it has dominated in the past, such as weightlifting, diving, gymnastics and table tennis.

But it also claimed victories in canoeing, cycling, rowing and athletics, and underscored its growing strength in swimming.

The majority of China's gold medals came from women or from mixed team events.

-New York Times