How many caps did Galen Rupp wear during the men’s marathon race on Sunday morning, as a light rain fell in Rio, along with most of his rivals and doubters? It was hard to tell with all the poorly timed NBC commercial breaks, such as the one that prevented viewers from seeing when the Kenyan Eliud Kipchoge dropped those last few runners still nipping at his heels, with about four miles to go, or the one that aired right when Rupp finally fell back to third place for good. But six is probably a safe estimate. Rupp kept changing his hats at hydration stations. Were they packed with cooling gel? Chilled in ice water? Few beyond Rupp and his coach—the divisive but effective Alberto Salazar, Nike’s dark wizard of track and field—know for sure. (Reports surfaced in June of 2015 that Salazar had been accused of urging some of his athletes to use banned substances. Rupp, however, has never been caught doping and has never been sanctioned.)

What we do know is this: Rupp, the thirty-year-old distance runner from Portland, Oregon, whose hats now have their own Twitter account, took bronze in the Rio marathon, becoming the seventh and final American distance runner to medal at these Games. The last time the U.S. won as many as five distance medals at an Olympics was in 1924, in Paris. Other than Rupp’s performance this weekend, in just his second marathon—the first was in February of this year, at the U.S. trials—Americans have medalled only once in the event since 1976. (The last medallist was Mebrahtom Keflezighi, who won silver at the Athens Games. More on Meb’s performance momentarily.)

The gold belonged to Kipchoge, a five-feet-six, hundred-and-fifteen-pound man with a habit of scolding his rivals in the middle of races and smiling warmly at the end of them, who now has a claim to being the greatest marathoner of all time. He finished in 2:08:44. It was not an Olympic record, but it was a remarkable time considering the relative heat (mid-seventies), humidity (mid-nineties when it wasn’t raining), perilously wet course, and absence of helpful pacers—or, for that matter, many fans—to push him along.

Despite all that, and wearing just a single hat, Kipchoge’s victory was never much in question. All the drama concerned margins and runners-up. The first two-thirds of the race were utterly predictable. Then Kipchoge tossed off a 4:43 nineteenth mile, a 4:41 twentieth, and a 4:35 twenty-first. He tossed his hat—caught by a surprised cyclist, who was barely keeping pace alongside the course—with six miles to go, revealing his supremely confident face. Kipchoge, who is thirty-one, won six of the seven marathons he raced prior to Rio; in London, this spring, he missed the current world record—2:02:57, set by his countryman Dennis Kimetto—by eight seconds.

Marathon dominance by East Africans is still the rule, while podium-worthy American performances have, for decades, been the exception. When Rupp finally tossed his last hat off for good, with less than two miles left, his baby face was fully exposed. I have friends from Kenya and Ethiopia who ran distance races professionally for years. One once told me, when asked to describe the pain that a 2:10 marathoner will experience, “You feel like you will die.” He paused, realizing that this was an American cliché. “No, a_ctually_ die.”

Rupp finished, alive, in 2:10:05. Afterward, he admitted feeling “some pain,” despite the hundred-and-fifty-mile training weeks Salazar had put him through. He also, oddly, told NBC’s Lewis Johnson that he’d recently received some motivation from an Adam Sandler character. “I was watching ‘Happy Gilmore’ the other day,” Rupp said. “He fights being a golfer for a while, saying he’s a hockey player. I fought being a marathoner and wanted to run on the track, but maybe this is my best event.” The similarities seemed to end there.

In “14 Minutes: A Running Legend’s Life and Death and Life,” Salazar, who won three consecutive New York Marathons, in the early eighties, wrote, “Running a marathon is in many ways an imponderable exercise. No matter how thoroughly you prepare, there is always an element of discovery and surprise, sometimes gratifying; more often, unfortunately, otherwise.” For Meb Keflezighi, the other American given an outside chance to medal, it was an “otherwise” day. He stopped some seven times during the race, threw up, and literally fell across the line in thirty-third place. (He did a few pushups after falling. The tears came later.) It was a courageous swan song for the diminutive forty-one-year-old with the 2004 silver medal, but yet another reminder of the brutality of the 26.2-mile distance.

As the NBC commentators Craig Masback and Tim Hutchings were filling the more than two hours of race airtime, “14 Minutes” came up. “You have to hope he hasn’t read Salazar’s book,” one announcer said of Rupp, before paraphrasing from it: “Your mind can play so many tricks over the course of 26.2 miles. There are so many points where you can fall prey to either your panic or your exultation.”

Rupp did neither. Nor did Jared Ward, the mostly forgotten third American in the race, who finished sixth, in 2:11:30. A self-described “running nerd” and devout Mormon, Ward teaches classes at Brigham Young University and runs “only” six days a week, leaving time to observe the Sabbath. (He still gets in a hundred and twenty miles during those six days.) Ward wrote his B.Y.U. master’s thesis, in statistics, on optimal pace strategy in the marathon. His two main conclusions: learn to pace yourself, and take advantage of the downhill. No mention is made of rotating hats.