A 13-year-old Oakland girl who lost all brain activity after having her tonsils removed has been ordered by a judge to remain on life support.

Following a hearing on Friday, both the prosecution and the defendants agreed that Jahi McMath will stay on a ventilator while medical officials seek out a neurologist to perform further examinations on her, according to the Associated Press. McMath's family had initially asked that their 13-year-old daughter not be removed from life support.

McMath was first admitted to the Children's Hospital & Research Center in Oakland for a tonsillectomy on Dec. 9, the Los Angeles Times reported. Doctors were hoping that the procedure would help cure sleep apnea, rapid weight gain and other health issues she was encountering. But according to the McMath family, Jahi's condition quickly went downhill after her surgery. She went into cardiac arrest, and there was no oxygen flow to her brain, according to the Times

A CT scan taken the next day bore images of Jahi's swollen brain - two thirds of which had blown up, leading doctors to name her brain-dead. They planned to remove her from life support in the days that followed, before an attorney sent the hospital a letter on behalf of the family.

"I don't want to have my Christmas every year remind me of her being taken off a ventilator," Jahi's mother Nailah Winkfield told KNTV-TV.

The hospital on Thursday told Jahi's family that they couldn't keep her on life support. Chris Dolan, the family's attorney, said his clients requested that the hospital feed the 13-year-old through a nutrition tube and keep her on life support through Christmas. But the family said the doctor wouldn't honor their requests.

"He said, 'She's dead, dead, dead, dead,'" and wouldn't give her any nutrition, continuously saying, "We don't support the dead," according to Jahi's Uncle, Omari Sealey. 

Chief of Pediatrics Dr. David Durand wrote in a statement earlier this week that the hospital and medical officials were working hard to help the grieving family.

"Our hearts go out to this patient and her family," the statement read. "Unfortunately, we have not been authorized by the family to share information with the public about this matter. Consequently, we are not able to correct misperceptions created about this sad situation."