A US congresswoman was in a medically induced coma Sunday but responding to commands after being shot through the head when a gunman opened fire on a crowd at an Arizona political event.

A nine-year-old girl and a federal judge were among six people killed and at least 12 others were wounded before bystanders tackled the alleged gunman, 22-year-old local resident Jared Lee Loughner, who was arrested at the scene.

Police have released a surveillance camera photo of a possible accomplice spotted at the site of the shooting.

The picture shows a white male with dark hair, dressed in blue jeans and a dark blue jacket, approximately 40 to 50 years old, who was apparently walking inside a store with his hands in his pockets.

"This is about as good as it is going to get," said Peter Rhee, the trauma chief at the University of Arizona Medical Center, where Representative Gabrielle Giffords was operated on after the attempted assassination.

Doctors said Giffords, who was shot at point-blank range, was helped by the fact the bullet did not go through both hemispheres of her brain, traveling instead the length of the left side of her brain, an area that controls speech.

"We're very encouraged by that. We are still in critical condition. Brain swelling at any time can take a turn for the worse. But I am cautiously optimistic," said Michael Lemole, the head neurosurgeon who operated on Giffords.

Lemole told a press conference that Giffords responded Sunday to simple commands but had not yet spoken and had been put in a medically induced coma to allow her brain to rest.

"We take those commands as simple but show high functioning in the brain," he said.

Outside the hospital, flags flew at half mast and well-wishers left flowers, candles, and portraits of the 40-year-old lawmaker. One sign read: "Fight, Gabby, fight!"

Giffords, a member of President Barack Obama's Democratic Party, was meeting constituents outside a supermarket in Tucson on Saturday when the assailant shot her and then sprayed bullets from a 9mm Glock pistol on the small crowd that had gathered.

The motivation for the shooting remained unclear. Loughner, a failed army recruit, had filled the Internet with angry and largely incoherent condemnations of the government.

A Loughner profile posted on YouTube listed Karl Marx and Friedrich Engels's "The Communist Manifesto" and Adolf Hitler's "Mein Kampf" among his favorite books.

A witness who helped wrestle Loughner to the ground said it appeared to him that the suspect had come ready to kill even more people because he had two more ammunition clips and a knife in his pockets.

"He was ready for war, he was not playing around," Joe Zamudio told CNN. "He was blank. He was callous, almost."

Giffords, like most rank-and-file legislators, traveled with no security detail, despite threatening incidents during the recent bitter campaign that saw the Democrat re-elected in a typically Republican-leaning state.

Giffords, married to NASA astronaut Mark Kelly, is the first Jewish woman elected to Congress in Arizona. She barely survived a bruising re-election bid last year to a Republican rival from the right-wing Tea Party movement.

The attacks have shaken official Washington and -- although the motivations of the shooter are unclear -- raised concerns that the heated political climate could be feeding violence.

"Let me say one thing, because people tend to pooh-pooh this business about all the vitriol that we hear inflaming the American public by people who make a living off of doing that," Pima county sheriff Clarence Dupnik said.

"That may be free speech, but it?s not without consequences," he told a Saturday press conference.

The last major political shooting incident in the United States was in 1981 when then president Ronald Reagan was shot and injured at a Washington hotel.

The only member of Congress ever to die in the line of duty was Leo Ryan, a California Democrat killed in 1978 in Guyana as he investigated a cult that later carried out a notorious mass suicide.

The House of Representatives has called off proceedings in Washington for the upcoming week and the flags will fly at half mast in honor of the Giffords staffer who died.

President Barack Obama condemned the attack as an "unspeakable tragedy" adding: "Such a senseless and terrible act of violence has no place in a free society." Obama later spoke to Giffords' husband by telephone Sunday, the White House said.

Conservative standard-bearer Sarah Palin had controversially placed Giffords on a political hit list, putting her under an image of a gun's cross-hairs for her support of Obama's health care overhaul.

Palin offered condolences for the victims, writing on her Facebook page: "We all pray for the victims and their families, and for peace and justice."