It was a cool Marathon Monday in Boston and the on-site medical tents were keeping up with the stream of running-related strains, sprains, and dehydration cases that the event normally brings.

Across town, in Boston’s Longwood section, Stephanie Kayden, senior physician in charge of the emergency room at Brigham and Women’s Hospital (BWH), a Harvard affiliate, and instructor in medicine at Harvard Medical School (HMS), headed a team of about 50 that, in addition to handling the regular big-city emergency traffic, had been waiting for overflow and the more serious cases from the tents.

“We thought we were going to be free and clear,” Kayden said.

Then came the message that there had been a bombing. Kayden, the emergency department staff, and the hospital’s incident command team — already on alert because of the marathon — sprang into action, clearing out current patients, admitting those who couldn’t go home, and releasing those who could.

They called in extra trauma teams, adding 60 doctors, nurses, and other staff, more than doubling the medical personnel in the emergency department. Over the coming hours, the Brigham team treated 31 patients — two in critical condition and nine with injuries severe enough to go directly into surgery. The most badly injured, Kayden said, was a man whose right leg had been blown off below the knee.

A similar scene played out at hospitals across the city, including other Harvard-affiliated institutions such as Massachusetts General Hospital (MGH), Beth Israel Deaconess Medical Center (BIDMC), and Children’s Hospital Boston.

The poised response was a tribute to the training that prepares medical personnel to handle such crises, Kayden said.

“Even though the Brigham had never, to this time, had to respond to a bombing, these mass casualty events, as we call them, are something we train for all the time,” Kayden said. “When it finally happened, it was a testament to our training and to the drilling by our incident command team at the hospital that everything went as smoothly as it did.”

“Even though the Brigham had never, to this time, had to respond to a bombing, these mass casualty events, as we call them, are something we train for all the time,” said Stephanie Kayden. File photo by Katherine C. Cohen

Arnold Howitt, co-director of the Harvard Kennedy School’s Program on Crisis Leadership and executive director of the Ash Center for Democratic Governance and Innovation, said the preparation was apparent across the city. Despite the large number of casualties, emergency crews were able to stabilize victims on-site and rapidly transfer them to the hospital. Major medical centers were able to absorb the sudden influx of badly injured patients.

Michael VanRooyen, director of the Harvard Humanitarian Initiative (HHI), an HMS professor and an emergency physician at the Brigham, was among those who responded Monday. When he looked at the doctors around him, he realized many — including Kayden — were affiliated with HHI and had worked with the organization in crises around the world.

“As I, like many of my colleagues, came the ER to help, I realized that most of the physicians on duty were our HHI doctors. They were as composed today as they have been in many humanitarian crises around the world,” VanRooyen said in a statement posted on the HHI website. “Yesterday was another reminder that the work we do globally is closely tied, in character and impact, to the work we do here at home.”

While Harvard-affiliated physicians were responding to the needs of dozens of badly injured patients, Nicholas Christakis was trying to make sure Pforzheimer House students weren’t among them. He spent the afternoon seeking information about three student runners and dozens more who had been in the crowd. As people gathered to discuss the attacks, one Pforzheimer House tutor, a former Army explosives expert, talked about IEDs, or improvised explosive devices.

“We were deeply alarmed during the course of the day here at Pforzheimer House until we could account for all of our students,” Christakis said. “We did everything from consulting our own U.S. Army bomb disposal expert to taking to Facebook.”

Christakis, a professor at both HMS and the Faculty of Arts and Sciences’ Sociology Department, is a specialist in social networks and how both good and bad effects — including things like happiness, obesity, and smoking — tend to travel along those intricate pathways. And, though people woke up in anger and despair across the region Tuesday, the bombing is the kind of event that doesn’t need social networks, Christakis said. Instead, it affects people directly.

“There are physical shockwaves that emanate from the bomb, and there are psychological shockwaves as well,” he said.

The impact at Harvard was magnified because of our proximity to the incident, Christakis said, showing the psychological power of nearby events to draw people’s attention, even though more distant or diffuse incidents might be more destructive or have higher death tolls.

Assistant Professor of Psychiatry Michael Miller, of HMS and BIDMC, said some of the attacks’ deep impact may stem from the nature of the marathon itself.

Unlike other sporting events where the losing side goes away hurt or angry, the marathon is a celebration of participation, of the athletic spirit that drives ordinary people to do something extraordinary. In Boston, it’s also an unofficial spring festival, celebrated by the entire community, with people sitting on lawn chairs and eating ice cream along the course.

“Here, everybody is just enjoying a community event in the most marvelous way,” Miller said.

The attack also affected people because it punctured the feeling of invincibility most of us carry just to function properly each day. It served as an unwelcome reminder of how vulnerable we are, Miller said.

For those who were directly affected, recovery may entail acute medical care, physical and psychological therapy, and perhaps follow-up treatment.

“It’s on a case-by-case basis, one size does not fit all,” Miller said. “If you were really close and suffered a life-changing injury, then you may have a lot of work to do to try to understand, try to figure out what happened in such a random and horrible event.”

For those angry or depressed but not directly affected by the attacks, the old saying “time heals all wounds,” will likely apply, Miller said. Not watching every bit of news coverage may help, he added.

“People will remember it, it will be on their minds, depending on how close to the tragedy they were,” Miller said. “People who ran the race will think about it more than I will, people downtown will think about it more than those in Newton. Time does heal.”