On Sunday, more than fifty thousand runners will mass behind the starting line of the New York City Marathon. What will they think they are doing? Some might believe that, in running twenty-six miles and three hundred and eighty-five yards, they are recreating an ancient Greek myth. Other historically minded participants will curse the British Royal Family, for whose pleasure the 1908 Olympic marathon course was stretched to its current length. But few runners will know that the city whose streets they are about to race through created the marathon as we understand it today.

New York’s responsibility for the race can be traced to two distinct moments. The first came on November 25, 1908, at the old Madison Square Garden, when two short, lithe men, named Dorando Pietri and Johnny Hayes, raced a marathon indoors. Pietri was a confectioner from Carpi, Italy. Hayes was an Irish-American, employed by Bloomingdale’s, who trained on the store’s old rooftop cinder track at night. The pair had recently competed at the London Olympics in one of the most dramatic marathons of all time—a contest that had captivated newspaper readers around the world. Now, across the Atlantic, came the rematch.

The old Garden was huge. Its Moorish minaret was the second-highest tower in the city, and its auditorium was the largest in the world. Even so, running 26.2 miles inside was a stretch. The organizers constructed a track measuring a tenth of a mile; the race was two hundred and sixty-two laps.

Despite the seemingly limited entertainment value of watching two men run in small circles for an evening, Hayes vs. Pietri II was a sellout, and the atmosphere was raucous. A journalist from the Times called the contest “the most spectacular foot race that New York has ever witnessed”:

The immense hall was filled completely when the race was finished, with an attendance that included every class, from the gallery gods to the patrons of first nights and grand opera, and partisan feeling swayed the enormous gathering with such force that the rival brass bands, one of Italian musicians for Pietri, whom the crowd insistently called by his first name, and who thus popularly became Dorando, and another band, that of the Sixty-ninth Regiment, for the Irish-American athlete, were drowned in the clamor.

Flags waved and partisans cheered until the big amphitheater trembled with sound, and through it all the rival runners plodded around the ten-laps-to-the-mile track, and inhaled the dust and tobacco smoke with which the hall reeked.

At the conclusion of the race—which Pietri won, by forty-three seconds, in 2:44:20—partisan feeling was still running high. The Times reported that a riot was “narrowly averted.”

Professional runners across Britain and Europe had competed in races of about twenty-five miles during the nineteenth century, but the first race of that length to be called a “marathon” took place in 1896, at the first modern Olympiad, in Athens. The event commemorated an episode from 490 B.C., when a messenger named Philippides was said to have run from the Greek city of Marathon to the capital city of Athens—a distance of around twenty-five miles—to share the news that the Greeks had beaten the Spartans in battle. Having uttered “Chairete, nikomen!” (Joy to you, we’ve won!), Philippides died on the spot, from exhaustion. The myth was just that, however: according to Herodotus, there was a messenger boy with a similar name, but he did not deliver the message from Marathon to Athens, and he didn’t die. Still, the organizers of the first modern Olympic Games declared that they were recreating Philippides’ fabled heroism.

The 1896 Olympic marathon was just less than twenty-five miles long, and was won by a Greek named Spyridon Louis. During the next few years, marathons varied considerably in length, but they were usually a little more than twenty-five miles. Whatever the length, however, the marathon was not a popular event. At the 1900 Paris Olympics, the American delegation accused the winner, Michael Theato, of having cheated by taking shortcuts. They claimed that, as a French baker, he would have known every backstreet in the city. In fact, Theato was not a baker, and he was raised in Luxembourg. There remains debate among historians about whether or not he cheated.

The whiff of scandal increased at the 1904 Olympic marathon, in St. Louis, Missouri. It was an oven-hot day, and many competitors struggled to breathe on the dusty roads. One ruptured his esophagus before the halfway point. But the first man over the finish line, an American named Fred Lorz, entered the arena looking, in the words of one report, “strangely fresh.” Lorz, it turned out, had hitched a ride in a car at the nine-mile point, and only started running again when the car broke down, at twenty miles. Soon after crossing the line in first place and having his picture taken with Alice Roosevelt, he admitted his fraud, and he was later banned from the sport for a year. Meanwhile, the real winner, Thomas Hicks, had been propelled to the finish line by a mid-race cocktail of brandy, egg whites, and rat poison.

When the Olympics reached London in 1908, the wisdom of running a race over such a long distance still seemed questionable. (Indeed, after St. Louis, a committee was formed to debate the marathon’s future.) Another debacle like the ones in St. Louis or Paris might have relegated the marathon to the scrap heap of short-lived Olympic sports—a dishonor that has since been bestowed upon such events as tug-of-war and Basque pelota. It was good fortune for all of us, then, that the 1908 Olympic marathon was one of the most bizarre and thrilling races of all time.

The 1908 London Olympic marathon course was promoted as being twenty-six miles and three hundred and eighty-five yards long. The Games’ organizers were anxious to gain the Royal Family’s approval, and they wanted the race to begin at Windsor Castle and have it finish beneath the Royal Box in the White City Stadium. Jack Andrews, a member of the Polytechnic Harriers club, who designed the 1908 marathon, said that the initial suggestion for a course fulfilling these criteria was twenty-four and a half miles. But the Harriers tinkered with their design when they realized that a professional race sponsored by the London Evening News was slated to use the same route on another date.