At the starting line of a marathon, runners tend to worry more about the hills ahead and the training behind them than the possibility of a terrorist attack along the course.

But Monday's deadly explosions at the finish line of the Boston Marathon added safety to the list of pre-race worries for many athletes. With more than 26 sprawling miles to cover, is it even possible to keep major races secure?

PHOTOS: When Terrorism Targets Sports

All major marathons create protocols to deal with crises and enlist police officers to watch their courses, experts said. Given the nature of long-distance races that wind through urban centers and large crowds, though, there will always be some element of risk.

A marathon "has the classic elements sought by international or domestic terrorist groups or emotionally disturbed people," said Anthony C. Roman, CEO of Roman & Associates, a private investigation and security consulting firm. "They want to maximize the number of casualties and maximize media coverage."

Finish lines are especially vulnerable, Roman said, because they are packed with spectators, runners and members of the media. In an old colonial city like Boston, streets may also be narrow or otherwise hard to cover with security.

NEWS: How to Make Contact in an Emergency

And while many sporting events bring together lots of people and TV cameras, marathons may be particularly exposed because there is no stadium entrance to be equipped with metal detectors. Marathons also cover so much ground that they pose many miles worth of challenges for police officers.

The best way to protect a marathon, Roman said, would be to begin long before the actual event with intelligence-based profiling that would identify areas of vulnerability. Before the race, all manhole covers along the route ideally would be sealed and garbage containers removed to minimize places where terrorists could plant bombs.

During the event, the course's sidelines and rooftops would be lined with uniformed and undercover officers who would look for suspicious activity. And bomb squads would do periodic sweeps of the course before, during and after the race.

Few events, however, have the money and manpower to be so thorough.

National Guard soldiers guard a roadblock near the scene of a twin bombing at the Boston Marathon on April 16, 2013 in Boston.Getty Images

More than anywhere else, Roman said, New York City and London have the most resources to protect their marathon courses, including helicopters equipped with thermal-imaging cameras, sophisticated computer software for tracking suspicious behavior and large teams of intelligence experts.

Still, most marathons do their best to protect everyone involved, said Virginia Brophy Achman, executive director of Twin Cities in Motion, which organizes the Twin Cities Marathon, the country's ninth largest.

The Twin Cities Marathon has a crisis plan that gets reassessed every year, Brophy Achman said, when race representatives and city officials run through a list of "what ifs," from bombs to fires to floods to extreme heat. Canine units sweep the finish line several times during the weekend of the fall race and the area is covered by security during set-up and teardown.

PHOTOS: The Boston Marathon Explosions

The marathon world is widely collaborative, she said. Her organization has shared its crisis manual with other races across the country.

"Safety is always first and foremost our top priority -- for runners, spectators and the community," Brophy Achman said. "Our eyes and ears are on high alert on race day. We're always aware of what's around us."

To fill in whatever gaps might be left by lapses in law enforcement, Roman said, runners can help protect themselves by cultivating awareness of their surroundings. Stay away from large crowds, for example. Skip the triage area at the finish line and arrange instead to meet a family member with Gatorade and ice packs a few blocks away.

NEWS: Who Is Behind the Boston Bombings?

"If someone doesn't fit in the crowd, if it's 78 degrees and they have on a hoodie and sunglasses and a heavy backpack, I would run in the other direction," Roman said. "I would immediately stop and notify a police officer and let them handle it."

"Things have changed, post-9/11," he added. "That's the world we live in."

Still, as horrific as it was, yesterday's tragic bombing should not stop people from running marathons and other races, Brophy Achman said.

"At the end of the day, we have to live our lives and running, I think, is a metaphor for that," she said. "You have times where running is tough and you push through and do it. This is a good reminder for being grateful for what we have."