In the midst of a tight reelection campaign, President Obama flew to Colorado on Sunday for the second time in less than a month. It is a key battleground state that he captured four years ago and would like to hold on to this fall.

But Obama did not talk politics on either visit.

Last month, the president toured damage caused by widespread wildfires near Colorado Springs. He visited with firefighters and used a 642-word address to emphasize how America “comes together” in the face of natural disasters.

On Sunday, he returned to offer more comfort two days after 12 people were killed and 58 were wounded at an Aurora movie theater in one of the worst mass shootings in U.S. history. He met with the victims and their families at the University of Colorado hospital and made brief remarks to reporters.

Obama said he met with each family and “confessed to them that words are always inadequate in these types of situations.”

But, he added, “my main task was to serve as a representative of the entire country and let them know we are thinking about them this moment and will continue thinking about them every single day.”

Healer in chief is a role all presidents must play in a country without a singular religious leader, putting politics aside and striking the right tone of empathy and grace in a time of grief. Yet it is also a role fraught with political peril — a president’s actions and words will be interpreted for signs of partisanship and political gain, especially in an election year in a bitterly polarized climate.

Obama is all too familiar with the scenario, having traveled twice before to cities in the wake of mass shootings. He delivered speeches at memorial services at Fort Hood, Tex., in 2009 after 13 service members were killed, allegedly by a fellow soldier, and in Tucson in 2011 after a gunman killed six and wounded 13, including then-Rep. Gabrielle Giffords, outside a grocery store.

Such appearances have become expected of presidents. George W. Bush spoke at the service for the victims of the Virginia Tech shootings in 2007, and Bill Clinton spoke in Colorado after the Columbine shootings in 1999.

In Aurora, Obama did not attend a prayer vigil Sunday night outside city hall. Instead, he met with local officials before flying on to San Francisco to start a previously scheduled, three-day campaign swing.

Did Obama skip the vigil for fear of appearing too political in an election season? Officials said no, explaining that the president did not want his presence, requiring a massive security apparatus at an outdoor event with 1,000 people, to inconvenience guests and take attention away from the victims.

On ABC’s “This Week,” Aurora Mayor Steve Hogan called Obama’s visit a “wonderful gesture” and said the decision was “totally appropriate.”

The campaigns of Obama and Republican challenger Mitt Romney have suspended negative ads in Colorado out of respect for the grieving. Obama campaign spokeswoman Jen Psaki said the president’s ads would remain off the air at least one more day, and the campaign has canceled a grass-roots rally in Portland, Ore., on Tuesday.

Other Obama campaign events, including a fundraising dinner at a private residence with 60 people and a reception at the Fox Theater in Oakland, Calif., on Monday, will go on as planned.

State Rep. Rhonda Fields (D), who represents the district that includes Aurora, said she would have liked Obama to attend the vigil, though she agreed that visiting with the victims and families is the most important act for the president.

“I would be so appreciative of the president of the United States taking time out to meet” a grieving family, said Fields, whose son was shot and killed, along with his fiancee, in Aurora in 2005 as he was preparing to testify at a murder trial. “This was a senseless act of violence. As a family, it would touch my soul.”

The task of expressing grief and sympathy is not difficult, said Jeff Shesol, a speechwriter for Clinton who accompanied him on his visit to victims of the Columbine High School shootings. In the case of the Aurora shootings, suspect James Holmes, 24, has not been tied to organized terrorist groups or political causes. So Obama does not have to touch on such delicate topics, Shesol said.

But, he added, the more complicated question is the political ones that follow — in this case, whether mass shootings are all-to-regular occurrences that cannot be prevented. “Is this just the way it is in this country?” Shesol said. “Is it just the way it’s going to be, with a shooting like this every year or two years?”

Such questions have inserted themselves already, along with the dicey topic of gun control. White House press secretary Jay Carney, asked whether Obama would make a renewed push for an assault weapons ban, acknowledged that opposition in Congress made such a move unlikely.

Asked if a debate over Second Amendment rights should be highlighted in the campaign, Psaki said the shooting “is so fresh and new for so many people” that it is “really too early to say how this will play” on the trail. “We’re just taking it day by day,” she said.