(CNN) -- A federal judge was killed and a congresswoman gravely wounded this morning in a shooting outside of a Tucson, Arizona, grocery store, according to police and government officials. In all, six people died and 12 were wounded in the shooting, including U.S. Rep. Gabrielle Giffords, D-Arizona, according to Rick Kastigar, bureau chief for the Pima County Sheriff's Department. President Barack Obama later said Chief Judge John Roll of the U.S. District Court for Arizona was among the dead. A nine-year-old girl also died in the attack, according to authorities. The child, whose identity had not been released, was pronounced dead at a hospital. // // // // An Arizona law enforcement source and a federal law enforcement source identified the suspect as Jared Lee Loughner. Other law enforcement sources put his age at 22. U.S. Capitol Police said the suspect was in custody. Police recovered a 9mm Glock handgun, according to senior law enforcement sources. Dr. Peter Rhee of University Medical Center in Tucson, said Giffords, 40, had undergone surgery for a single gunshot to the head that passed through her brain. Giffords was among five patients listed in critical condition, Rhee said. At least two victims with gunshot wounds were transported to another hospital, Northwest Medical Center, according to spokesman Richard Parker. Kastigar declined to comment on a possible motive for the attack. Police have set a news conference to discuss developments in the case for 6 p.m. (8 p.m. ET). Tucson police Chief Roberto Villasenor said his department had secured the homes and offices of some unnamed federal officials as a "precautionary measure." Although U.S. Capitol Police said there was no evidence of a broader threat involving federal officials, the agency said it had advised other members of Congress to take "reasonable and prudent precautions regarding their personal safety and security," the agency said in a statement. Obama said he had directed FBI Director Robert Muller to travel to Arizona to support the investigation. An FBI spokesman said the agency was sending agents to the scene, Rhee, in a brief news conference at the hospital, said that Giffords had been moved to intensive care from surgery and said he was "very optimistic" about her recovery. "I'm about as optimistic as it can get in this situation," he said. He said the next 24 hours will be key for determining the extent of her recovery. Giffords, a Democrat, was first elected in 2006. She has served as chairwoman of the House Space and Aeronautics Subcommittee and also holds seats on the House Science and Technology and Armed Services committees. Giffords' colleagues in Congress reacted quickly to the shooting. Sen. John McCain, R-Arizona, said the attack was committed by a "wicked person who has no sense of justice or compassion."