The 13-year-old Oakland girl who lost brain activity after undergoing surgery, but whose family is trying desperately to keep her alive, has found a new long-term care facility that will take her in. 

Following a court date on Friday, a California judge ruled that Children's Hospital Oakland was allowed to remove Jahi McMath from life support at 5 p.m. on Monday unless the family's legal representation filed an appeal, or found a new facility that would take in the 13-year-old girl, the Associated Press reported. 

The family, which has fought to keep Jahi on life support on grounds that she wasn't deceased, said that she must remain on a ventilator. 

Jahi was first admitted to Children's Hospital in Oakland for a tonsillectomy on Dec. 9. Doctors hoped the procedure could help with the teenage girl's rapid weight gain, sleep apnea and other issues. But after her surgery, Jahi's condition took a serious turn. She went into cardiac arrest, and there was no oxygen flow to her brain, the Los Angeles Times reported. 

A CT scan taken the next day showed Jahi's swollen brain - two thirds of which had blown up - leading doctors to pronounce her brain-dead. They planned to take her off life support in the following days, before an attorney mailed the hospital a letter on behalf of the family. 

McMath will need a breathing tube and feeding tube attached to her once she is transferred to the other medical facility, which the hospital first refused to do.