But it was a magic moment on top of a major miracle. Shortly after a bedside visit from President Barack Obama, with friends from Congress, staff members and family present, Giffords' moves brought fresh hope.

"It's a major milestone," said Pia Carusone, Giffords' congressional chief of staff, who was in the room at University Medical Center at the time. "We have to remember what we are dealing with here. She's in very critical condition, and she has a long road ahead of her, but this is certainly a big moment."

Rep. Debbie Wasserman Schultz, D-Fla., also was in the room and provided details to CNN. She said Giffords started "struggling to open her eyes" after she good-naturedly urged her "to get better as soon as possible" so that she could come visit at her family's house in New Hampshire this summer.

That's when Giffords began to open her eyes, Schultz said.

"The doctors couldn't believe it," she said. "They said this is such a good sign."

Then her husband, astronaut Mark Kelly, asked Giffords to touch his wedding ring.

"She started doing that. She just started rubbing his arm," Schultz said. "She went from opening her eyes really just in slits to opening them almost fully. It wasn't for very long. Then, they'd close again.

"It was the most incredible experience that I've ever had."

Sen. Kirsten Gillibrand of New York also told CNN she was in the room. When Kelly asked for a thumbs-up, Giffords raised her entire hand, Gillibrand said.

P. David Adelson, a neurosurgeon with Phoenix Children's Hospital, said that Giffords' ability to follow commands is positive indicator for her recovery.

Giffords' opening her eyes and responding to her husband's voice is "a great sign," Adelson said .

Adelson compared the brain to a computer with its complex connections. Serious trauma, such as a gunshot wound, disrupts those connections.

For "connections that were disrupted or impacted, the quicker they come back, the better the long-term outcome," Adelson said. "The fact that she is responding so quickly is a good sign."

Carusone tempered the excitement over the development with a dose of caution.

"Some people are saying that her eyes are open. That's not accurate," Carusone said. "She opened her eyes. That's very different."

Before his speech a public memorial held at McKale Center at the University of Arizona. President Barack Obama had stopped by the hospital to visit Giffords.

He was the first to announce the improvement in her condition.

"Gabby opened her eyes for the first time," Obama told the capacity crowd at the basketball arena. "Gabby opened her eyes. I can tell you this: She knows we're here, and she knows we love her, and she knows that we will be rooting for her through what is undoubtedly a difficult journey."

Obama also visited four other shooting victims recovering at the medical center after a gunman shot them Saturday in front of a supermarket north of the city. Six people were killed and 13 injured.

The presidential motorcade arrived at the medical center shortly after 4 p.m. Obama spent nine minutes with Giffords and Kelly in the hospital's intensive-care unit.

Obama also visited with doctors, nurses and other hospital staffers before the motorcade left the hospital shortly before 5 p.m.

Dr. Peter Rhee, the hospital's trauma surgeon who has treated Giffords and the other patients, led the hospital tour for Obama and first lady Michelle Obama.

The president and first lady also spent time with Ron Barber and Pam Simon, Giffords' wounded staffers, as well as two other patients.

Earlier in the day, Rhee said that Giffords was nearing the end of the most dangerous phase of her recovery. She is breathing and making small movements on her own as doctors ease sedation.

Dozens of hospital employees and members of the public waiting outside the hospital greeted the arrival of the motorcade, with many cheering and waving.

Ruth Osterlind, who was at the hospital Wednesday because her father was having surgery, described the shooting as an attack on all Tucson residents because Giffords, an elected official, was the presumed target.

Osterlind said the president's arrival will help the city's residents recover.

"I'm glad he's here," she said. "It shows he understands our pain and our grief and we need some healing."

Scottsdale resident Marci Matt arrived at the vigil in front of the hospital with her daughter Haley, who is starting spring semester classes at UA.

They stopped by to see the memorial and had hoped to get a glimpse of the president.

Dozens of hospital employees and members of the public waiting outside the hospital expressed appreciation that the president had stopped to visit.

Throngs of people lined along Campbell Avenue, the main street facing the hospital, waiting for Obama. As his motorcade drove past, people craned their necks to get a glimpse of the president and first lady.

Michelle Debbie Knutson, 43, said she headed over to the medical center as soon as she got off work because she had heard Obama might head there.

People in the crowd said he waved at them, with his window rolled down.

"He looked right at me and waved," Knutson said. "I had my camera in one hand and waved with the other."