(CNN) -- A judge has extended a temporary restraining order in the case of 13-year-old Jahi McMath. The move means the hospital is now not permitted to disconnect the girl from life support until January 7.
They thought the tonsil surgery would help her. She feared she'd never wake up.
Now, a 13-year-old girl once known for smiling, giggling and dropping off her sister every day at kindergarten lies motionless in a California hospital bed, hooked up to machines that doctors say are the only thing keeping her heart beating.
There have been days of prayers and protests for Jahi McMath. There was a fierce court battle as a devastated family fought to keep her on life support and doctors argued she had already died. The case drew national attention and fueled debate.
Doctors and a judge have declared her brain dead and said there's no chance Jahi will come back to life.
Family members say they're hoping for a miracle as a deadline looms. A judge has said the hospital can disconnect the machines after 5 p.m. (8 p.m. ET) Monday.
Just about an hour before that deadline, the girl's family told reporters they have located a facility in New York willing to take Jahi. The hospital, however, will not allow them to move her, said Jahi's uncle, Omari Sealey.
So attorneys for the family are filing a new complaint in federal court requesting a temporary restraining order and an injunction to prevent the hospital from disconnecting Jahi from life support, he said.
They are also requesting an extension of the order already in place and filing an appeal with California appellate courts.
"We are hopeful that one of these actions will forestall the hospital's rush to extinguish Jahi's chance at life," Sealey said.
It's unclear what will happen next.
But one thing is certain, an official told reporters on Monday.
"There are no winners in this very tragic case," Children's Hospital Oakland spokesman Sam Singer said.
Bleeding, cardiac arrest and brain death
Family members say the 8th grader was alert and talking after doctors removed her tonsils, adenoids and extra sinus tissue in a surgery earlier this month.
Doctors had recommended the surgery to treat pediatric obstructive sleep apnea, a condition which made her stop breathing in her sleep and caused other medical problems.
Before the surgery, Jahi said she was worried that she would never wake up, according to her uncle. She seemed fine after the surgery, but asked for a Popsicle because her throat hurt.
It wasn't long before something went terribly wrong.
In the intensive care unit, the girl began bleeding profusely -- an image her mother told CNN would be forever seared in her mind.
According to family members, Jahi went into cardiac arrest. Days later, she was declared brain dead.
Hospital officials have said privacy laws prevent them from discussing details of the case.
In court documents and public comments, they've maintained that there's no doubt that McMath is brain dead, describing the condition as irreversible. An independent doctor and a judge supported that conclusion last week.
"No amount of prayer, no amount of hope, no amount of any type of medical procedure will bring her back," Singer said Monday. "The medical situation here in this case is that Jahi McMath died several weeks ago."
Family raises money, searches for answers
But Jahi's family members maintain that they're hoping for a miracle and want to transfer the girl from Children's Hospital Oakland to another facility.
Jahi's family told CNN affiliate KGO that it spent Sunday working the phones, trying to line up another option.
"We are optimistic but are feeling ever anxious as the deadline of 5:00 on Monday approaches," family members said in a statement Saturday provided to KGO.
"We are working every minute to preserve our rights and Jahi's existence," the family said.
Media reports suggest one treatment location option has fallen through. The attorney representing Jahi's family has not responded to requests from CNN for comment on the matter.
So far the family has raised more than $25,000 on GoFundMe.com to move her. According to the site, more than 700 people have donated money in three days.
"To our knowledge, they (the family) do not have a facility to move the body to," Singer told reporters earlier Monday.
Asked by reporters what the hospital would do at 5 p.m. Monday, Singer declined to comment.
"The court has said at 5 p.m. today that the hospital will be allowed to unplug the ventilator, which is the only thing that is keeping Jahi McMath's heart beating," he said.
Read more here.