With perhaps only hours left to live, the 17-year-old girl mistakenly given a heart and lungs with the wrong blood type was handed an extraordinary second chance Thursday after doctors -- against all odds -- located another set of organs.

Surgeons rushed to transplant the new heart and lungs into Jesica Santillan, whose relatives had feared she would be dead by the weekend. She was in critical condition after the four-hour operation, and doctors warned it was too early to say whether she would pull through.

"She's as critical as a person could be," Dr. Duane Davis said at Duke University Hospital, noting that Jesica's body suffered damage while she was on life support. The organs removed Thursday could not be salvaged.

Magdalena Santillan, Jesica's mother, said she was no longer angry with the doctors since they had corrected their mistake. She said she had spoken to her unconscious daughter, praising her courage and letting her know she had supporters throughout the world.

"Everything is going to come out OK," the mother said in Spanish through a translator. "I'm really blessed."

The Mexican teenager with O-positive blood had waited nearly three years for a transplant. But in a mistake that still has not been fully explained, Duke surgeons gave her organs from a donor with type A blood on Feb. 7.

Her body rejected the new organs and she suffered a stroke and had to be put on life support. Doctors had little hope of finding a new heart and lungs in time to save her life, in part because of her blood type and because she is so small at 5-foot-2 and 85 pounds that any organs would probably have to come from a child -- and child donors are rare.

But new organs from a type O donor were found late Wednesday. People with type O blood can only receive organs of the same blood type. Type O is the most commonly occurring blood group, according to the American Red Cross.

Lloyd Jordan of Carolina Donor Services said the donor family had requested anonymity. He said the donation was not "directed" -- that is, the family did not specifically request that the organs be given to Jesica.

The organs were donated through the United Network for Organ Sharing, a national group that helps connect donors and potential patients.

Jesica's place on the list was determined in part by her poor condition and her age. Network spokeswoman Anne Paschke said the girl's immigration status played no role because hospitals are allowed to place non-citizens on their organ waiting lists and must give them the same priority level as citizens.

U.S. hospitals cannot perform more than 5 percent of their transplants on people who aren't residents of this country.

"We want to make sure that with such a scarcity of organs that we take care of people in the U.S.," Paschke said.

Relatives have said Jesica's family paid a smuggler to bring them from their small town near Guadalajara, Mexico, to the United States to get a transplant because a heart deformity kept her lungs from getting oxygen into her blood. Doctors said she would have died within six months without the transplant.

Sixth-grader Heather Adams said she hoped her best friend would recover so they could return to having sleepovers, shopping and spending time together.

"I'm very happy for her," the 12-year-old said through tears. "It was terrible when I found out she was unconscious."

Duke officials are still investigating what led to the Feb. 7 error, but have already identified a couple of mistakes.

Dr. James Jaggers, the surgeon in the case, wrongly assumed compatibility between the organs and patient had been confirmed, said Dr. William Fulkerson, the hospital's chief operating officer.

The hospital has added levels of verification for organ compatibility, and Fulkerson said those procedures were followed Thursday.

Jaggers also performed the second transplant, though the hospital said other surgeons were involved because of Jesica's complicated condition.

"We have faith in the surgeon," said Mack Mahoney, a leader of the fund-raising efforts to pay for Jesica's care. "We feel there was a grave mistake made. We do not question his skill as a surgeon."

The organ sharing network is reviewing what led to the flawed transplant. But the New England organ bank that sent the first heart and lungs said the organs were delivered with paperwork correctly listing the donor's blood type.

In the Santillans' hometown of Tamazula, relatives prayed for her safe return to Mexico. Ramona Santillan, Jesica's aunt, said she hoped to bring the girl to Mexico City's Basilica of Guadalupe, where a cloak with the image of the Virgin of Guadalupe is displayed.

"I promised the virgin that if she saves her, I would bring her [to Mexico City] as a thank you," she said.