Sunday was a prayerful day of official and unofficial mourning in this shattered community. The president of the United States flew into town to console the families of those slain and wounded, thousands of residents gathered for an evening memorial service, and hundreds more huddled in the rain for a prayer vigil across the street from the site of Friday's shooting rampage.

It now appears that the casualties could have been even more horrific. The gunman's semiautomatic assault rifle jammed and prevented him from emptying a 100-round magazine of ammunition, according to a law enforcement source.

There also emerged a new twist in the narrative that indicates that the alleged shooter, identified by authorities as James Holmes, 24, did not immediately surrender to police and could have come close to eluding capture by slipping away in the guise of a SWAT team officer.

Holmes, being held without bond at the Arapahoe County Jail, will appear in court for the first time Monday.

"Aurora is strong," said one handwritten sign at a makeshift memorial site 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."

Sunday evening, thousands of people filled a plaza in front of Aurora's city hall for the memorial 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.

President Obama flew from Washington on Sunday afternoon and 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.

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

This 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. 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 semiautomatic 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 believe the gunman first used the shotgun — some victims in the hospital 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 the 100-round magazine lying 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 American history.

Initial police accounts said Holmes surrendered without incident to police 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 officers arriving at the scene might have mistaken Holmes for a SWAT officer. He was allegedly dressed in black ballistic gear, including a helmet, throat guard, 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," Aurora Mayor Steve Hogan said nine of the people wounded at the theater were in critical condition at hospitals.

"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."

Hogan 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 emailed 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.

A fellow student of Holmes's in the four-year doctoral course in neuroscience at the University of Colorado's Denver medical campus in Aurora said Holmes was extremely quiet and reserved, spoke in a monotone, and was difficult to get to know.

"If no one had ever said anything to him, he wouldn't have said a word," said the student, who spoke on the condition of anonymity because the university has told students not to comment to the news media.

After classes, Holmes rarely socialized.

"I always just figured he liked being alone," the student said.

- - -

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.