“‘Everyone wants to be there this year,” a friend said recently, and accurately: In a show of courage and community, a near-record 36,000 runners are expected to take part in the 2014 Boston Marathon. An estimated 1 million spectators, twice the usual number, will gather along the historic Hopkinton-to-Boston route to cheer them on. Last year saw more than 23,000 runners start, and in a metropolitan area of 4.5 million, it seems everyone knows someone who was there—maybe even one of the three people killed or the 260 victims injured or maimed in the twin bombings at the finish line. Everyone has his or her story of April 15, 2013, one of the city’s most violent and traumatic days since the American Revolution.

Many of us want to be there this year not merely to run or watch a road race, but to reclaim a beloved Boston event, one that always saw the city bursting with early spring fever and civic pride. People want to show the bombers that they failed, that the city will not be cowed. A recent Globe story observed that many runners are “driven to prove something—to ‘take back our finish line,’ the rallying cry goes.” By doing so, they hope to heal the wounds the bombing inflicted on the city’s psyche.

“The anger, guilt, and heartbreak I still feel today will never go away,” wrote one 2013 participant in her application to run again. “But running the 2014 Boston Marathon will help me heal my mind.”

If this seems like a new and more emotionally fraught role for the race, so it is, in recent memory. But in its 117-year history, this is not the first time the Patriots Day run has been held in deliberate defiance of fear, nor that it has served as a kind of communal healing event. As early as 1917, the race went on despite some calls for its cancellation amid fears of a German attack on the city’s waterfront in the days following American entry in the Great War. What happened that year, and in other times of embattlement since then, demonstrates the power of a sporting event to replace dread with pride and to bring a city together.

The United States formally entered WWI on April 6, 1917, just 13 days before the scheduled Boston Athletic Association Marathon. Suddenly, this seaward-looking city felt itself squarely in the Kaiser’s sights. As America’s closest port to Europe, the Hub had been shipping food, supplies, and even weapons to the Allies for years. Sitting on the Atlantic Coast, a city where fishermen still depended on the sea for survival—and where welders and riveters in the Charlestown Navy Yard began outfitting six vessels for battle that week—Boston felt particularly vulnerable before Imperial Germany’s new and seemingly unstoppable submarine forces.

The day Congress declared war, a German submarine sank a merchant ship carrying horses, grain, and shells from Boston to Liverpool. The following day, another German sub was sighted off Nantucket as fishing boats were reported sunk in Georges Bank, prompting the US Navy to set mines and nets around Boston Harbor. The scares continued over the next two weeks: A mysterious aircraft was spotted over the Portsmouth Navy Yard in New Hampshire, and a native German living in Melrose was found to be hoarding a small cache of guns and dynamite. The swirl of threats caused Harvard and other colleges to cancel the rest of the athletics season. Among some BAA members, talk arose of canceling the Boston Marathon as well.

But critics quickly responded with rousing reminders of the race’s military roots: It was inspired by the legend of Pheidippides, the Greek soldier who ran to Athens from the plains of Marathon to deliver news of victory. Convinced, the BAA went forward with the event, and Bostonians geared up to make it the biggest Patriots Day celebration yet, as well as a wartime demonstration of the physical fitness of America’s young men.

Of course, it wouldn’t be much of a demonstration if an American couldn’t win the thing. Unfortunately, two of the world’s top runners were entered from Finland. To the experts, there was only one question: which of them would come in first and which second.

The day before the Marathon (and the day after a German raider reportedly fired on an American destroyer just outside New York Harbor), three Coast Guard stations on Cape Cod heard a 10-minute exchange of heavy artillery fire echo from somewhere in a foggy Massachusetts Bay. That evening, the city’s largest daily newspaper, the American, plastered the worst-case scenario atop its front page, suggesting German subs were engaging US ships in firefights just 30 miles from Boston Harbor. (The Navy never denied the story, and in fact, in a documented battle the following year, four German torpedoes actually landed on the Cape’s shores.)

In spite of these alarming rumors, on Patriots Day between 150,000 and 500,000 people, waving American flags, gathered along the 25-mile route. (The Marathon’s distance had not yet been standardized at 26.2 miles.) These were “Great Crowds,” as a Boston Post headline put it, for an era when the metro area’s population was half what it is now. Hundreds more spectators rode special trolleys or took to their automobiles or bicycles to follow the 48 men who competed that year.

Boston Athletic Association

William J. “Bricklayer Bill” Kennedy in an undated photo

One runner, William J. “Bricklayer Bill” Kennedy, had wrapped his head in a homemade American flag bandana, an unusual sight then. (Disclosure: Bill Kennedy was my grandfather’s uncle.) A peripatetic, New York-born bricklayer with a second-generation Irish brogue, Kennedy had become a fan favorite for his pluck and personality, but the gray-haired typhoid survivor was not considered a contender to win, certainly not against the “Flying Finns”: 1912 Olympic gold medalist Hannes Kolehmainen, and reigning national 10-mile champion Villar Kyronen, who had placed second at Boston the previous year. But sounding like a ready warrior, Kennedy had told the Globe that this of all years, American runners should prove their mettle: “We must repel the Finns.”

To the crowd’s delight, Kennedy passed Kyronen in Natick, then passed Kolehmainen to take the lead just before Wellesley College. There, a young woman dashed out to hand him a full-size Old Glory banner, which he waved while running the next quarter-mile. Kyronen dropped out in Newton, where the runners battled a stiff east wind, along with a cloud of auto exhaust and macadam dust, while they climbed the infamous hills. As Kennedy, still in the lead, passed a construction site in Brookline, his brother “brickies” clapped bricks together in support. After Coolidge Corner, Kennedy faltered, his feet growing heavy. But when someone shouted that his friend and rival Sid Hatch had steamed into second place and was gaining fast, the bricklayer found his reserves and regained form.

“Cheered on by the largest crowd that ever witnessed the finish of a Marathon run,” according to the Globe, Kennedy broke the tape at Exeter Street in first place with a time of 2:28:37, followed by Hatch and another American, 1911 winner (and future marathon superstar) Clarence DeMar. Kolehmainen was fourth. It was “one of the most popular victories achieved in this or any other country,” the Globe reported. And it was perhaps just what the on-edge city had needed. This unexpected American triumph fueled celebrations that Kennedy and the sportswriters of his generation would recall for decades. Despite being a father of two in his mid 30s, Kennedy soon enlisted in the war effort, building roads in France with the Army’s 23d Engineers.

Boston Athletic Association

Joe Smith (right) passes Lou Gregory to take lead in the 1942 Marathon just before Cleveland Circle.

In April 1942, this scene would find a clear echo. Once again, the coastline feared German U-boat attacks, leading to blackout orders. For the first time ever, the race was held on Sunday, so that nobody would miss work in the defense plants. Air-raid wardens patrolled the course as 500,000 people gathered to watch 145 men compete for the then-traditional Greek laurel.

Once again, the city thrilled as an underdog beat the odds and triumphed, in “one of the most popular victories ever chalked up,” according to the Globe. The impossibly all-American-sounding Joe Smith was a milkman from Medford whose brother was a sailor stationed at Pearl Harbor on Dec. 7. After winning the race in the record time of 2:26:51, Smith celebrated until 3 o’clock in the morning, then decided to enlist himself.

“This is a people’s war,” the Globe quoted one spectator as saying at the finish line, “and the Joe Smiths of the world are going to show ’em how to crack other records before we get done with it.”

Globe File/1975

Bill Rodgers wins the 1975 Boston Marathon.

The 1975 Boston Marathon came at the end of a very different war, the long and divisive Vietnam conflict. Though our physical shores were never threatened, the war had torn at the nation’s social fabric. The last Americans were days away from evacuating Saigon when Bill Rodgers laced up his shoes in Hopkinton. Today, Rodgers’s name is synonymous with serious long-distance running. But few had taken the sport seriously back when he began training in the early 1970s. A countercultural, self-proclaimed “radical” and a conscientious objector, Rodgers ran laps around Jamaica Pond, risking verbal abuse (“Get a job!”) and beer cans hurled by passing motorists.

Something changed when locals of all stripes gathered along the historic course in 1975 and saw this same long-haired hippie, clad in a homemade “BOSTON” T-shirt, leading a strong international field of 2,400 runners. No sportswriter had picked Rodgers to win, but the hometown boy bested Canadian Jerome Drayton in a duel for the lead at the early mark of mile 11, and he never gave up that lead. Over the last few miles, the crowd roared with seemingly one voice, “Boston, Boston!” as he charged past.

In winning that Marathon—in which he set a new record of 2:09:55—Rodgers endeared himself to this pugnacious city despite his avoidance of the draft. Boston—Sports Town, USA—embraced the hippie in a way that would have been unthinkable just a few years prior. Not only did Rodgers help make road running a mainstream endeavor, but his win helped unite a divided city and nation around a common victory, even if the scars of Vietnam remain to this day.

***

There’s a tragic irony in the bombing at last year’s Marathon. Whenever it was needed, the race had been a means by which Bostonians banished fears and healed wounds afflicting society. These included not only those stemming from wars; think also of the discrimination that female and disabled athletes helped overcome through their now-integral participation in the race. Even that day in 2013, thousands of runners were using the Marathon to raise money to fight cancer or homelessness, while others ran in defiance of their own struggles with weight or addiction.

Then at 2:48 p.m., the Marathon itself came under attack. Within a week, the alleged perpetrators had been killed or caught. But for those in Greater Boston, the shock remained of a healing, celebratory ritual becoming a target all its own.

Over the months since then, between the defiant roar of David Ortiz, the pregame appearances of bombing rescuer Carlos Arredondo, and most powerfully the stories of perseverance on the part of injured survivors, Boston has beaten back the terror that gripped it that day, and seems poised to take back the finish line. For many, there will be some anxiety in returning to the scene of the crime. In the 21st century, the threat of invasion by an enemy nation has been eclipsed by the fear of sudden and mysterious mass attacks by small-time maniacs, politically motivated or otherwise.

For this reason, the 2014 Boston Marathon offers a different and even more direct opportunity to mend past wounds. Like the flag-waving crowds of years past, Bostonians are gearing up to meet their fears head on—but this time, the thing we’ll be rallying around is the Marathon itself. From Hopkinton Common to Copley Square, we’ll be defending the very right of a people to run, to gather, and to cheer each other on.

The author of “Boston Then and Now” (Thunder Bay, 2009), Patrick L. Kennedy is coauthoring a book about his relative “Bricklayer Bill” and the Boston Marathon. He can be reached at plk@bu.edu.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.