Mayor Thomas Menino, who is recovering from a broken leg unrelated to the bombing, watches on as President Obama speaks during an interfaith healing service last week following the Boston Marathon blasts.
It becomes an essential part of the job more often than they might expect. While they're rarely prepared for it, how they respond will define their time in office perhaps more than any other act.
"For me, it was to date the hardest thing I've had to do in office," says Hilary Bryant, the mayor of Santa Cruz, Calif., where two police detectives were killed in February.
"When you run for office, you think about what you want to change or contribute to your community," Bryant says. "You don't think about having to manage a tragedy."
When she heard about the Boston Marathon bombing, Bryant says she thought about friends from her days growing up in New England who were running in the race, as was one of her predecessors in office.
She also thought about Boston Mayor Tom Menino, who rose from a hospital bed, recovering from a broken leg, to respond to the upheaval from the two bomb blasts last week.
"One of my first thoughts was a feeling of compassion for the mayor, because you think of all the things that individual is going to have to deal with," Bryant says. "For all the other responsibilities you have in a leadership position, when there's a crisis, it's your job to be present."
'Calm And Reassuring'
For Steve Scaffidi, the mayor of Oak Creek, Wis., the second call he received may in some ways have been more helpful.
On Aug. 5, after a white supremacist named Wade Michael Page killed six people and himself at a Sikh temple, President Obama called Scaffidi and offered to put the full resources of the federal government at his disposal.
Then Scaffidi received a call from Steve Hogan, the mayor of Aurora, Colo., where there had been a mass shooting at a movie theater less than three weeks earlier.
"He said, 'Be calm and be reassuring to my community,' " Scaffidi says. "That was essentially how I got through that really tough week, and the weeks after."
Scaffidi was still in shock himself when faced with having to speak to large gatherings of people. But he made his remarks and accepted as many media requests as he could.
The Face You Present
It's the role of an elected official to be visible and to take charge, making sure that resources are going where they're needed most.
"There's an external factor of ensuring that everyone remains calm and everyone remains hopeful," says Mayor Walter Maddox of Tuscaloosa, Ala., which was torn apart by a tornado two years ago. "How you react affects how your staff reacts and, more importantly, how the public reacts."
No mayor wants his city to be defined by its worst moment, Scaffidi says, but rather by its response. Especially when the attention of the nation and perhaps the world is riveted to your home, you want to show resolve and a sense that the city will come back.
"It's very clear what the duty is in a tragedy," says Bob Walkup, who was mayor of Tucson in January 2011 when Arizona Rep. Gabrielle Giffords was shot and six residents were killed. "It is to help people start the recovery process, and the only way you can do that is by being there."
Walkup decided it was part of his duty to keep his own emotions in check until the moment of crisis had passed. Most politicians try their best to do the same, not to show heartbreak at a time when the community needs guidance and an expression of hope that they will get through the worst.
At a time of tragedy, no one seems to worry much about public officials going through what counselors call vicarious trauma.
"I never became inured to it," former Gov. Ted Kulongoski says of consoling Oregon families who had lost loved ones to war.
During R.T. Rybak's decade as mayor of Minneapolis, he's had to cope with the 2007 interstate bridge collapse, deadly tornadoes, and shootings. So many shootings.
Early in his term, Rybak tried to comfort the family of a 12-year-old girl who had been shot and killed. He thought about his own daughter, who was then 12, to find the words to express his sympathy.
"The only thing I could do is think about what if this were my daughter, and react as a dad," he says.
There have been too many shootings, too much death on his watch, to dig deep into the store of his personal emotions each time. Rybak says he has talked with ministers about how they enter into trying situations and not have it take a toll.
There's no playbook, he's found. No right answers. But there is still the "strange privilege," he says, of being able to speak directly to those who are grieving about the loss an entire community is feeling.
And as mayor, you can't worry too much about yourself. "Your role is to show your community that you have a direction, that there is a person in charge," Rybak says.
"I came into office 11 years ago knowing I'd be dealing with development and education and snowplowing," he adds, "but these horrific events have been by far the most important things that I've dealt with."