OAKLAND, Calif. (AP) -- A California judge on Monday ordered a 13-year-old girl who was declared brain dead to be kept on life support until Jan. 7.
Alameda County Superior Court Judge Evelio Grillo ordered Children's Hospital Oakland to maintain Jahi McMath on a ventilator past the 5 p.m. Monday time that was set in a previous ruling.
The family wants to continue life support, saying there is hope for recovery.
Nailah Winkfield, the girl's mother, said she wept when she heard about the ruling and hugged relatives outside the hospital.
She said the delay was an answer to her prayers and a sign that she was right to keep fighting.
"Who wants to know the date and the time their child would die?" she said. "I don't care what anyone has to say about what I'm doing... I have to do what is right for me and for Jahi."
She said she does not believe her daughter is dead because her heart is still beating.
Sam Singer, a hospital spokesman, said it would comply with the judge's new order.
The family's attorney, Christopher Dolan, said he was pleased about getting the extension from Judge Grillo.
"He's giving us a meaningful opportunity to seek relief and what I consider a stay of execution," Dolan said. "I feel like I'm a death row lawyer and it does not feel good."
Dolan said he called Jahi's mother at the hospital about Grillo granting the extension and she said the hospital staff had cleared the family out of the waiting room in preparation for removal of the ventilator.
"She said it was a horrible feeling ,and when I got to tell her that her daughter would not be unplugged, she broke down in tears," he said.
Doctors at Children's Hospital and an independent pediatric neurologist from Stanford University have concluded the girl is brain dead.
Jahi underwent a tonsillectomy at the hospital on Dec. 9 to treat sleep apnea and other issues. After she awoke from the operation, her family said, she started bleeding heavily and went into cardiac arrest.
She was declared brain dead three days later.
The latest ruling on Monday came after the family said they would sue to keep Jahi on life support.
Family spokesman Omari Sealey, the uncle of Jahi, disclosed the plan to seek a restraining order against the hospital.
Sealey said the family took video of Jahi responding when her mother touched and talked to her. He also said a pediatrician examined her and said she was not dead.
A facility in New York state is willing to take Jahi, and arrangements have been made for medical transport with a doctor by her side, the uncle said.
The family said on its fundraising website that it had raised more than $25,000 for a possible transfer.
Earlier Monday, Singer reiterated the position of the doctors.
"This is one of the most tragic situations imaginable," Singer said. "A family has lost their young daughter. But unfortunately, Jahi is deceased. No amount of hope, prayer or medical procedures will bring her back."
Cynthia Chiarappa, a hospital spokeswoman, has said officials would have to understand the capabilities of the New York facility before allowing a possible transfer.
The hospital also said it would need to confirm there is lawful transportation included in any transfer plan and there is written permission from the coroner.
Doctors at Children's Hospital have refused to perform a tracheotomy for breathing and to insert a feeding tube -- procedures that would be necessary to transfer Jahi. The hospital has said it's unethical to perform surgery on a person legally declared dead.