Obama canceled a second appearance scheduled near Orlando, Fla., and was returning to Washington. Romney, too, was to address the matter at a previously scheduled campaign event in New Hampshire. He canceled some media interviews. Both candidates moved to pull ads against each other airing in Colorado.
Obama was notified at dawn at his hotel near West Palm Beach, Fla., by his counterterrorism adviser, John Brennan. The White House said there was no apparent connection to terrorism.
"Our time here is limited, and it is precious," Obama told supporters in Fort Myers. "What matters at the end of the day is not the small things. It's not the trivial things which consume us and our daily lives. Ultimately, it's how we choose to treat one another, and how we love one another. It's what we do on a daily basis to give our lives meaning and to give our lives purpose."
Romney, in a written statement, said: "We are praying for the families and loved ones of the victims during this time of deep shock and immense grief. We expect that the person responsible for this terrible crime will be quickly brought to justice."
The assault by apparently one shooter killed 12 people and injured at least 50 others in one of the deadliest mass shootings in recent U.S. history.
The enormity and horror of the incident immediately injected a new tone to the campaign, essentially demanding that both candidates for the time halt politics and attend to the nation's shock at the tragedy.
Obama sought to temper the campaign spirit of those at his event to fit the mood of the day. He thanked his supporters and said he had looked forward to talking about the differences between Romney and him, saying instead: "This, I think, is a day for prayer and reflection."
Nevertheless, as the end of this remarks about a nation that supports its own and appreciates its blessings, his supporters added a political touch by chanting "Four more years!"
It remained to be seen whether the episode would inject the volatile issue of gun rights an issue largely missing throughout the months of campaigning so far into the election debate.
New York Mayor Michael Bloomberg, in a radio interview, admonished both the president and his challenger to forcefully address gun violence.
"You know, soothing words are nice, but maybe it's time that the two people who want to be president of the United States stand up and tell us what they are going to do about it, because this is obviously a problem across the country," he said.
Obama said he viewed the moment through the eyes of a parent. He and his wife have daughters who turned 14 and 11 this year.
"What if Malia and Sasha had been in the theater?" he asked. "Michelle and I will be fortunate enough to hug our girls a little tighter tonight, and I'm sure you will do the same with your children. But for those parents who may not be so lucky, we have to embrace them and let them know we will be there for them as a nation."
The shooting brought a halt to political events around the country.
Many were canceled or postponed Friday, from Senate Republican Leader Mitch McConnell's news conference on Capitol Hill to a Democratic event in Reno, Nev., on funding for an alert system for missing children. Vice President Joe Biden canceled a fundraiser in Texas and first lady Michelle Obama did the same for planned campaign events in Virginia. Romney's wife, Ann, called off her scheduled event in Michigan.
The tragedy inspired unifying statements, rather than partisan pronouncements, from the nation's leaders.
"I join President Obama, and every American, in sending my thoughts and prayers to the victims of this awful tragedy," said House Speaker John Boehner, R-Ohio. "We will all stand with them, as one nation, in the days ahead."
"The thoughts and prayers of all members of Congress are with Coloradans this morning," said House Democratic Leader Nancy Pelosi, D-Calif.
In Fort Myers, there was none of the customary music to usher the president out. People seemed sad as they left.
Said Diane Buckley of Fort Myers: "I liked that someone in a position of leadership can be as emotional as that and take a moment to value the people we love and to reach out to others."
Associated Press writers Jim Kuhnhenn, Ben Feller, Mark Smith and Laurie Kellman in Washington, Tamara Lush in Fort Myers and Steve Peoples in New Hampshire contributed to this report.
Paris premiere of new Batman movie canceled
The Paris premiere of the new Batman movie "The Dark Knight Rises" has been canceled after a gunman killed 12 people at a Colorado opening of the same film.
Workers were pulling down the red carpet display in front of a movie theater on the French capital's famed Champs-Elysees after the Friday premiere was canceled. Some could be seen carrying away a large mask that had adorned the facade of the theater. Reaction to deadly Colorado theater shooting
Reaction to a shooting at a crowded Denver-area movie theater, where 12 people were killed and dozens more injured Friday in one of the deadliest mass shootings in recent U.S. history:
"Michelle and I are shocked and saddened by the horrific and tragic shooting in Colorado. Federal and local law enforcement are still responding, and my administration will do everything that we can to support the people of Aurora in this extraordinarily difficult time. We are committed to bringing whoever was responsible to justice, ensuring the safety of our people, and caring for those who have been wounded. As we do when confronted by moments of darkness and challenge, we must now come together as one American family. All of us must have the people of Aurora in our thoughts and prayers as they confront the loss of family, friends, and neighbors, and we must stand together with them in the challenging hours and days to come." President Barack Obama.
"Ann and I are deeply saddened by the news of the senseless violence that took the lives of 15 people in Colorado and injured dozens more. We are praying for the families and loved ones of the victims during this time of deep shock and immense grief. We expect that the person responsible for this terrible crime will be quickly brought to justice." Republican presidential candidate Mitt Romney.
"You know, soothing words are nice, but maybe it's time that the two people who want to be president of the United States stand up and tell us what they are going to do about it, because this is obviously a problem across the country. And everybody always says, 'Isn't it tragic,' and you know, we look for was the guy, as you said, maybe trying to recreate Batman. I mean, there are so many murders with guns every day, it's just got to stop. And instead of the two people President Obama and Gov. Romney talking in broad things about they want to make the world a better place, okay, tell us how." New York City Mayor Michael Bloomberg.
"As local law enforcement, first responders, and medical professionals work tirelessly in the aftermath, the federal government will be a partner. As families confront this tragedy, the nation and its leaders are praying for them." House Minority Leader Nancy Pelosi, D-Calif.
"This senseless massacre of so many innocent people gathered with friends and family in a movie theater reminds us not only of the great evil that exists in the hearts of some, but of the great and precious gift of life." Senate Minority Leader Mitch McConnell, R-Ky.
"I am deeply saddened by the terrible shooting in Aurora, Colorado. Federal, state, and local law enforcement agencies continue to respond to this horrific event and I have directed the Department of Homeland Security to provide any support necessary in the ongoing investigation. We are committed to bringing those responsible to justice. Our hearts and prayers go out to anyone impacted by this tragedy, especially the family and friends of those killed or injured." Homeland Security Secretary Janet Napolitano.
"This is not only an act of extreme violence, it is also an act of depravity. It is beyond the power of words to fully express our sorrow this morning. Our prayers and condolences go first to the families of those killed, and we share the grief of everyone affected by this senseless event. We appreciate the swift work by local, state and federal law enforcement. Coloradans have a remarkable ability to support one another in times of crisis. This one of those times." Colorado Gov. John Hickenlooper.
"This was a horrible, senseless and abhorrent act. My family and I are shocked and deeply saddened this morning and our hearts are with the victims and their families. My staff and I are in contact with and offering our support to law enforcement and medical officials as they respond to the shooting." Sen. Michael Bennet, D-Colo.
"My thoughts and prayers go out to all of the victims and their families in this senseless act of violence. I've lived in Aurora almost all of my life and nothing like this has ever happened here. This was the type of violence that I would have expected when I served in Iraq with the U.S. Marine Corps but never here at home." Rep. Mike Coffman, R-Colo.
"As someone who has suffered the lasting impact of gun violence, and president of Brady, I can tell you that we don't want sympathy. We want action. Just this past April 16, the anniversary of the worst mass shooting in American history, 32 victims of gun violence joined us to demand Congress take action to stop arming dangerous people." Dan Gross, president of Brady Campaign.