Michael Phelps, already the most-decorated Olympian of all-time, just keeps adding to his personal medal total at the Rio Games. (Video: Jayne W. Orenstein/The Washington Post/Photo: Jonathan Newton/The Washington Post)

For one summer every four years, America is divided by politics and united by the Olympics, and if the former dynamic happened to be particularly divisive in the summer of 2016, Frank Busch figured there was motivation to be distilled from it in the name of Team USA unity. In his big speech to the U.S. Olympic swim team ahead of the Rio de Janeiro Games, the USA Swimming national team director suddenly brought up the presidential race.

He noted how “toxic and venomous” the political atmosphere is. “The American people are wanting for something positive, something they can be proud of, something that unifies our country, something that brings them joy,” Busch told the gathered Olympians. “It’s the Olympics.”

There are plenty of ways to explain how the U.S. swimmers came to dominate the Rio Olympics, with a whopping 16 gold medals — one fewer than the rest of the world combined — and 33 overall in eight days of competition. The medal haul re-established the Americans’ dominance in the sport, which had been widely questioned following a poor showing at the 2015 World Championships.

Any accounting of the hows and whys would have to begin with Katie Ledecky and Michael Phelps, who combined for five individual golds and nine overall, including relays. It never hurts to have the best female and best male swimmers in the world on your side, and their teammates appeared to have taken their cues, at least in the water, from Ledecky’s indefatigable drive and Phelps’s edgy confidence.

Michael Phelps is a very big reason the United States won 16 golds in the pool in Rio. (Lee Jin-Man/Associated Press)

“He’s always had an edge, which is awesome,” Busch said of Phelps. “But his edge is now the team’s edge.”

Yet almost to a person, the U.S. swimmers attributed a large part of their success here to what transpired in the weeks leading up to Rio — at their July training camps in San Antonio and Atlanta and on the ground in Brazil in the days before the competition. From a distance, it may defy logic to think silly team-building exercises on land can make athletes go faster in the water, but the swimmers themselves swear it’s true.

“Coming together as a team helps you swim fast,” said sprinter Simone Manuel, one of the breakout stars of Team USA, with two gold medals and two silvers. “It’s that X factor — that we are a family and not just a team.”

There was the viral “Carpool Karaoke” video, featuring, among other sights, breaststroker Cody Miller dressed in a lobster costume, and Ledecky — owner of a learner’s permit but no driver’s license — driving some teammates around a gas station.

There were the traditional rookie skits, the late-night card games, the video clip on Manuel’s Twitter account of Ledecky doing “The Whip” (if she also did “The Nae-Nae,” it was unfortunately not included).

And then there was the Homestead Act of 1862.

At one pre-meet gathering of the U.S. women’s team, on a grassy area of the Athletes’ Village, U.S. assistant women’s coach Greg Meehan placed sheets of paper on the ground, each listing an individual event, handed out small American flags to his 22 swimmers, then delivered a brief history lesson about the 1862 act that opened up western lands.

American Katie Ledecky shows off one of her four Rio gold medals. (Michael Sohn/Associated Press)

Two by two, the swimmers from each race got up and stuck their flags in the Brazilian soil.

“We were just staking our claim in Rio,” Ledecky said. “And I think we did that in the pool, too.”

A year ago, at the world championships in Kazan, Russia, the vaunted U.S. team — minus Phelps, who was suspended by USA Swimming following a second DUI arrest — won just eight gold medals, its fewest since 1994. The poor showing was underscored by the men’s 4x100-meter freestyle relay finishing 11th in qualifying and failing to make the final, and the fact only one other U.S. swimmer besides Ledecky, veteran Ryan Lochte, managed to win an individual gold.

Here in Rio, though, the slide was reversed. The men’s 4x100 free relay won gold. Seven different swimmers won individual golds. Thirty-nine of the 45 team members walked away with at least one medal. U.S. dominance was restored.

“It means,” said head U.S. men’s Coach Bob Bowman, “our plan worked.”

Asked Saturday about the poor performance in Kazan, Busch said he was never worried. The United States, unlike other countries, plots its strategy around the quadrennial Olympic cycle, not the semi-annual world championships or other major meets.

“This is where we want to perform,” he said. “You ask anybody: Do you want to be great at World Championships or be great at the Olympics? You know what the answer’s going to be.”