"She knows we are here," Obama told a crowd at the University of Arizona that included thousands of enthusiastic college students. "She knows we love her, and she knows we are rooting for."
"There is nothing I can say that will fill the sudden hole torn in your hearts," he said. "But know this: The hopes of a nation are here tonight. We mourn with you for the fallen. We join you in your grief."
Arizona Gov. Jan Brewer, a Republican, told the crowd that the shooting "pierced our sense of self-being" but vowed that the state "will not be shredded by one madman's act of darkness."
The event, held five days after a gunman killed six people and wounded 14 during the congresswoman's constituent event outside a suburban Safeway grocery store, took the tone of a pep rally for unity rather than a memorial service for the dead.
National leaders and local heroes were met with repeated standing ovations and cheers. Thousands who attended wore navy-blue T-shirts with the name of the event's theme, "Together We Thrive, Tucson and America."
"If this tragedy prompts reflection and debate, as it should, let's make sure it's worthy of those we have lost," Obama said. "Let's make sure it's not on the usual plane of politics and point-scoring and pettiness that drifts away with the next news cycle."
Obama cautioned against jumping to conclusions about the alleged killer's motives. "For the truth is that none of us can know exactly what triggered this vicious attack. None of us can know with any certainty what might have stopped those shots from being fired, or what thoughts lurked in the inner recesses of a violent man's mind."