US Rep. Gabrielle Giffords of Arizona was shot in the head Saturday when an assailant opened fire outside a grocery store during a meeting with constituents, killing at least five people and wounding several others in a rampage that rattled the nation.Giffords was among at least 10 people wounded, and the hospital said her outlook was "optimistic" and that she was responding to commands from doctors. The hospital said a 9-year-old child was among those killed, and a US Marshal said a federal judge was also fatally shot in the attack.Jordana Horn contributed to this report.Giffords spokesman C.J. Karamargin said an unspecified number of her staff members were injured in the shooting. Congressional officials said an aide to Giffords was killed, and President Barack Obama said five people died in all.Police say the shooter was in custody, and was identified by people familiar with the investigation as Jared Loughner, 22. Pima County Sheriff's officials said he used a pistol to carry out the shooting spree. US officials who provided his name to the AP spoke on condition of anonymity because they were not authorized to release it publicly.The shooting prompted an outpouring of sympathy from politicians and people around the country. Obama called the shooting "an unspeakable tragedy" and that such "a senseless and terrible act of violence has no place in a free society." Obama sent his FBI director to oversee the investigation."It's not surprising that today Gabby was doing what she always does, listening to the hopes and concerns of her neighbors," Obama said in a nationally televised news conference. "That is the essence of what our democracy is about."The American Jewish Committee expressed shock at the shooting. “This is a dark day for our country,” AJC Executive Director David Harris said in a press release. “Our thoughts are with those shooting victims who were murdered and those injured who remain in the hospital, along with their families and loved ones.”“There are worrying indications that the gunman was motivated by extremist political views, which encourage the use of violence against those who think differently,” said Harris. “He should be prosecuted to the fullest extent of the law, and law enforcement should investigate whether he acted alone or had any accomplices.”Federal law enforcement officials were poring over captured versions of a MySpace page that belonged to Jared Loughner and over Youtube video published to the Internet weeks ago under an account "Classitup10" and linked to him. The MySpace page, which was removed within minutes of the gunman being identified by U.S. officials, included a mysterious "Goodbye friends" message published hours before the shooting which exhorted his friends to "Please don't be mad at me."In one of several Youtube videos, which featured text against a dark background, Loughner described inventing a new US currency and complained about the illiteracy rate among people living in Giffords' congressional district in Arizona. Two spellings of his last name were given in the aftermath of the shooting — Loughner and Laughner."I know who's listening: Government Officials, and the People," Loughner wrote. "Nearly all the people, who don't know this accurate information of a new currency, aren't aware of mind control and brainwash methods. If I have my civil rights, then this message wouldn't have happen (sic)."Three hours after the shooting, the L-shaped shopping center in Tucson was blocked off by police and had fire trucks and other vehicles in its parking lot that blocked the view of the store's front door. No shell casings could be seen from the area 500 yards (460 meters) from the store where reporters and photographers were kept.Outside Giffords' office on Capitol Hill, a handful of congressional staffers could be seen walking into her office without comment, some with roller bags and one who was in tears. About a half dozen yellow flowers, placed by one mourner, sat outside the door.U.S. Marshal for Arizona David Gonzales confirmed to the Associated Press that US District Judge John Roll also died in the attack.Giffords, 40, was re-elected to her third term last November. She was a member of the Arizona House and Senate before coming to Washington.Giffords tweeted shortly before the shooting, describing her "Congress on Your Corner" event: "My 1st Congress on Your Corner starts now. Please stop by to let me know what is on your mind or tweet me later."Giffords is married to astronaut Mark E. Kelly, who has piloted space shuttles Endeavour and Discovery. The two met in China in 2003 while they were serving on a committee there, and were married in January 2007.In a statement of condolence, Sen. Bill Nelson, chairman of the Senate Commerce Space and Science Subcommittee, said her husband is training to be the commander of the next space shuttle mission slated for April. His astronaut brother is currently serving aboard the International Space Station, he said.Giffords was first elected to Congress amid a wave of Democratic victories in the 2006 election, and she won a narrow victory against a favorite of the ultraconservative tea party movement in the 2010 election.She has been mentioned as a possible Democratic nominee in 2012 for the US Senate seat held by Republican Jon Kyl, who has not said whether he'll run again, or for the governor's office in 2014.The shooting comes amid a highly charged political environment that has seen several dangerous threats against lawmakers but nothing that reached the point of actual violence.Giffords has drawn the ire of the right, especially for her support of Obama's health care reform bill from politicians like Sarah Palin.Her Tucson office was vandalized a few hours after the House vote to approve the health care law in March, with someone either kicking or shooting out a glass door and window. In an interview after the vandalism, Giffords referred to the animosity against her by conservatives. Palin listed Giffords' seat as one of the top "targets" in the November elections because of the lawmakers' support for the health care law."For example, we're on Sarah Palin's targeted list, but the thing is, that the way that she has it depicted has the crosshairs of a gun sight over our district. When people do that, they have to realize that there are consequences to that action," Giffords said in an interview with MSNBC.In the hours after the shooting, Palin issued a statement in which she expressed her "sincere condolences" to the family of Giffords and the other victims.Capitol police responded to the shooting by advising lawmakers and their staff to "take reasonable and prudent precautions regarding their personal security."Despite her clashes with the right, Giffords describes herself as a former Republican and current Blue Dog Democrat. The Blue Dogs are moderate centrist Democrats."You know, actually as a former Republican, you know, I consider myself someone who is pretty in the middle, I'm a blue dog Democrat, and one that is interested in making sure that our country maintains our prosperity and frankly, our superiority over other countries and that's where we look at these threat, obviously our defense budget, our level of education," she said in an interview with Fox News earlier this week.