FBI Director Robert Mueller was headed to Arizona to coordinate the investigation, Obama said. Federal authorities have jurisdiction in an attack on a sitting member of Congress.
Giffords' husband, astronaut Mark Kelly, was en route to Tucson from Houston, where he has been preparing to command the last scheduled space shuttle mission, which is supposed to launch in April.
Dupnik said he had no reports on what Loughner may have said during the shooting but said that he would describe him as "unstable."
The Pima County Sheriff's Office is taking the lead of the investigation and was assisted by the FBI, Joint Counterterrorism Task Force and the U.S. Capitol Police.
An urgent email message to members of Congress from the Capitol Police informed them of the shooting and advised them to "take reasonable and prudent precautions regarding their personal security at home and in public forums."
Giffords, a Democrat, was holding a "Congress on Your Corner" event at a Safeway supermarket in northwest Tucson when the shooting occurred.
Rayle, who was at the event, told ABC News a man approached Giffords and shot her before turning his gun on other people randomly.
"I went to the side of the table by a concrete post and I looked up and saw a man shoot her in the head. And then he began spraying gunfire everywhere. At that point I ducked behind a concrete post and as he came around it," he said. "The whole thing unfolded in about 12 or 15 seconds. As he came around it I laid down on the ground and acted as if I was shot."
Rayle, who eventually helped subdue the shooter, said the gunman had an "impassive face" as he was shooting.
"He did try to escape and I think one of her staffers tackled him," Rayle said. "I assisted in holding him down until more people arrived. He did struggle. He did not say anything."
Jason Pekau, another witness who worked at a nearby Sprint store, said he heard 15 to 20 gunshots and saw lots of people running and screaming that the Congresswoman had been shot.
Pekau also said two bodies were covered on the sidewalk after emergency responders had arrived at the scene.
A Democratic member of Congress who asked not to be identified said one of the dead was a Giffords staffer.
Washington was in shock after the shooting and statements condemning the violence poured in from both sides of the political aisle.
"Whoever did this; whatever their reason, they are a disgrace to Arizona, this country and the human race, and they deserve and will receive the contempt of all decent people and the strongest punishment of the law," Sen. John McCain of Arizona said in a statement.
House Speaker John Boehner said he was "horrified" and strongly condemned the attack.
"An attack on one who serves is an attack on all who serve," he said in a statement.
Democratic Leader Nancy Pelosi called the shooting a "national tragedy" and praised Giffords as a "brilliant and courageous member of Congress."
Giffords, a representative for Arizona's 8th District who just won reelection to a third term, has been the target of conservative political opponents in recent months.
In March of last year, Giffords' office was vandalized just after she voted in favor of the health care reform law. The intruders destroyed a glass door and a window at her Tucson Congressional offices.