TUCSON, Ariz. (AP) -- 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 the killed, and a U.S. Marshal said a federal judge was also fatally shot in the attack.
Giffords spokesman C.J. Karamargin said an unspecified number of her staff members were injured in the shooting. Congressional officials said an aide to the Democrat 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. U.S. 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. President Barack 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."
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 and 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 U.S. 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 casing could be seen from the area 500 yards 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 U.S. 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 next commander of the space shuttle mission slated for April. His 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 tea party favorite in the 2010 election.
She has been mentioned as a possible Democratic nominee in 2012 for the U.S. 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.
A San Francisco man upset with House Speaker Nancy Pelosi's support of health care reform pleaded guilty to threatening the Democratic congresswoman and her family, calling her directly on March 25 and threatening to destroy her Northern California home if she voted for health care reform.
In July, a California man known for his anger over left-leaning politics engaged in a shootout with highway patrol officers after planning an attack on the ACLU and another nonprofit group. The man said he wanted to "start a revolution" by killing people at the ACLU and the Tides Foundation.
Giffords herself has drawn the ire of the right, especially for her support of the health care 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 midterm 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.
"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 Channel this week.