Sunday was a day to mourn here — and ask, fruitlessly, why.

Two days after a shooting rampage killed 12 people and wounded 58 in a movie theater, President Obama flew in to praise victims and survivors. And Colorado leaders held the first large public memorial service, asking a crowd of thousands to repeat “We will remember” after each of the 12 names.

Away from these rituals, new details emerged about the suspect, James Holmes, 24. Authorities said the gunman might have killed more if his assault rifle had not jammed. And he might have been mistaken for a SWAT officer by arriving police, had not one officer spotted something odd in his body armor.

But these details did not answer the searching questions of the first memorial events.

“Why did this senseless act of violence happen?” Aurora Mayor Steve Hogan asked, facing families of the dead and thousands of people standing behind them. “It may be impossible to arrive at an explanation that would make sense to us.”

Holmes, being held without bond at the Arapahoe County jail, is scheduled to appear in court for the first time Monday.

“Aurora is strong,” said one handwritten sign at a makeshift memorial marked with 12 white crosses near the Century 16 movie complex, where the gunman burst into a midnight screening of the new Batman movie, “The Dark Knight Rises.”

A large banner read “Angels Walk With Those Who Grieve.”

On Sunday evening, thousands of people filled a plaza in front of Aurora’s city hall for the vigil. The event blended familiar rituals of mass grief — American flags waved, and mourners laid flowers and lighted candles — with symbols of the young fan community that had gathered in the theater that night. One man held up a sign that combined the Batman bat silhouette with the “C” on Colorado’s flag. A woman paired the bat with a bright-red heart. “Hope Lives,” that sign said. Police officers watched from the rooftops.

Obama went to the University of Colorado Hospital in Aurora to meet with the families of victims. Ten of the victims are still being treated in the hospital, with seven listed in critical condition.

Obama said he “tried to assure them that although the perpetrator of this evil act has received a lot of attention over the last couple of days, that attention will fade away. And in the end, after he has felt the full force of our justice system, what will be remembered are the good people who were impacted by this tragedy.”

Speaking at the hospital, he told a long anecdote about a 19-year-old woman who was shot in the neck and her friend, who refused to abandon her and who put pressure on the wound even as the gunman continued to fire. Such courageous young Americans, Obama said, “assure us that out of this darkness a brighter day is going to come.”

Jordan Ghawi, brother of Jessica Ghawi, an aspiring sports reporter killed in the attack, tweeted Sunday: “Sat down with President Obama. He has been incredible. He too has agreed not to mention the shooter’s name.”

Colorado is a swing state in the presidential election, but the candidates have pulled down their television ads. Obama chose not to attend the large memorial service later in the evening; he flew on to the West Coast.

Nor has he tried to use the mass shooting to call for any new gun-control laws. White House press secretary Jay Carney told reporters on Air Force One during the flight to Colorado, “The president’s view is that we can take steps to keep guns out of the hands of people who should not have them under existing law.”

A law enforcement source, who is close to the investigation but not authorized to speak publicly, said something went awry in the killer’s planned assault at the theater. Police said the alleged gunman had three weapons: a Remington shotgun, a Smith & Wesson M&P assault rifle and a Glock .40-caliber handgun.

The assault rifle, which is akin to an AR-15 and is a civilian version of the military’s M-16, could fire 50 to 60 rounds per minute and is designed to hold large ammunition magazines. The source said that Holmes allegedly had obtained a 100-round drum magazine that attached to the weapon but that such large magazines are notorious for jamming.

The law enforcement official said authorities think the gunman first used the shotgun — some victims have buckshot wounds — and then began using the assault rifle, which jammed. Then he resorted to the handgun.

Aurora Police Chief Dan Oates, interviewed on “Fox News Sunday,” did not confirm or deny that the gun jammed but said police found a 100-round magazine on the theater floor. He said he did not know whether it was empty.

Holmes is accused of killing 12 people and wounding 58 in one of the worst mass shootings in U.S. history.

Initial police accounts said he surrendered without incident to officers who found him at his car behind the theater complex. But Oates, in an interview on CBS’s “Face the Nation” on Sunday, described a more complicated scene in the minutes after the shooting. He said police arriving at the scene might have mistaken Holmes for a SWAT officer. He was allegedly dressed in black ballistic gear, including a helmet, a throat guard, a vest, leggings and gloves.

Oates said a piece of equipment in Holmes’s elaborate gear — he would not specify which piece — struck one of the responding officers as irregular. The officer questioned Holmes. Oates did not describe the exchange, only the result: Holmes was arrested.

Police, meanwhile, are trying to restore some sense of normalcy to the neighborhood where Holmes lived and where residents of five buildings had been evacuated after police discovered that the suspect’s apartment had been booby-trapped with dozens of explosives.

After clearing the apartment of explosives Saturday, bomb squad officers on Sunday transported hazardous chemicals to a nearby field and burned or destroyed the material. Police said Holmes spent months amassing explosives, weapons and ammunition.

In an appearance Sunday on “Face the Nation,” Hogan said nine of the people wounded at the theater were in critical condition.

“They’re in bad shape,” Hogan said. “There are people who have had already numerous surgeries, numerous brain surgeries. There are some folks that are in bad shape.” He said authorities were analyzing the contents of Holmes’s apartment.

“I’m told there was a computer inside the apartment, and with the assistance of the FBI that computer will be completely analyzed,” he said. “That may take some time. So we’re hopeful that will yield some information.”

Meanwhile, details began to emerge about the failed neuroscience student who is scheduled to appear in court Monday. He tried to join a shooting range in late June. Glenn Rotkovich, owner of the Lead Valley Range in Byers, Colo., said Holmes e-mailed a request for an application to join. The application included a series of questions, including “Are you prohibited by state or federal law from possessing firearms or ammunition?” and “Have you ever been convicted of any domestic violence offense?” Holmes replied in the negative to all four such screening questions.

But when Rotkovich called Holmes, he said, he got an answering machine with a “bizarre,” guttural, unintelligible recorded greeting. He told his staff that if Holmes showed up he should not be allowed to fire weapons until Rotkovich checked him out.

At the memorial service, an array of speakers struggled to explain what had caused the attack. A Catholic bishop used the word “evil” six times.

Colorado Gov. John Hickenlooper (D) did not even want to try. “I refuse to say his name,” he said, to the loudest applause of the night. He sought to turn the attention to victims instead, reading their names and asking the crowd to remember them. At some names, family members cheered. Others brought cries of grief.

The scope of the tragedy was brought home at the end of the night The crowd was supposed to sing “Amazing Grace” as families of the dead filed out. But the song ended, and the families were still walking.

“Let’s do the first verse again, ‘Amazing Grace,’ ” an emcee said. The crowd sang it again, then again. Then another time, just humming and repeating “praise God” until the last of the family members had left the plaza.

Heath and Achenbach reported from Washington. Sari Horwitz, Carol D. Leonnig, Julie Tate and Jennifer Jenkins in Washington and Eli Saslow and special correspondent Sandra Fish in Colorado contributed to this report.