(CNN) -- A judge granted a temporary restraining order Friday to keep a 13-year-old girl on life support after she was declared brain dead following a tonsillectomy at a hospital in Oakland, California.
Alameda Superior Court judge Evelio Grillo gave the family of Jahi McMath and hospital officials until Monday to appoint an independent physician to further examine the girl.
Jahi was declared brain dead December 12, three days after she was to have surgery to remove her tonsils.
Doctors at Children's Hospital & Research Center in Oakland had recommended the tonsillectomy and other procedures to treat Jahi's sleep apnea, weight gain, inability to concentrate, short attention span and other afflictions. Her surgery initially appeared to have gone well, said Sandy Chatman, Jahi's grandmother who is herself a nurse and who saw the girl in the recovery room.
But soon after surgery, Jahi's condition quickly deteriorated and she went into cardiac arrest, her family said.
A scan showed two-thirds of Jahi's brain had swollen. Doctors declared her brain-dead, and days later planned to take her off life support until receiving a cease-and-desist letter from the family's attorney, Christopher B. Dolan.
Jahi's mother, Latasha "Nailah" Winkfield, who has maintained a constant vigil by her daughter's bedside, said her daughter has responded to touching and shows other signs of life.
In a meeting Thursday night between Jahi's family and doctors, attorney Dolan said the girl's mother pleaded with doctors to insert a feeding tube, keep her on a ventilator through Christmas and give the family 48 hours' notice should doctors decide to take Jahi off of life-support.
In their written response to the family's court motion Friday, attorneys for the hospital said Children's Hospital and Research Center Oakland had "no duty to continue mechanical ventilation or any other medical intervention for its deceased minor patient Jahi McMath."
"Ms. McMath is deceased as a result of an irreversible cessation of all functions of her entire brain, including her brain stem," the response said, adding, "Tragically, Ms. McMath is dead and cannot be brought back to life."
Attorney Dolan said the family was told by hospital officials Thursday that it was "time to come to a consensus about terminating life support." The attorney said the family was told, in effect, "She is morally and legally dead, dead, dead."
Hospital officials have publicly called on the family to allow them to discuss Jahi's case, citing patient privacy laws that currently prevent them from disclosing information. "Our hearts go out to the family and friends of Jahi McMath. This is a tragic situation," Dr, David Durand, the hospital's chief of pediatrics, said in a statement.
"We want the public to know that the family has not permitted us to discuss the medical situation. We implore the family to allow the hospital to openly discuss what has occurred and to give us the necessary legal permission -- which it (the family) has been withholding -- that would bring clarity, and we believe, some measure of closure and deeper understanding of this medical case," the statement read.
Jahi's uncle, Omari Sealey told CNN that the girl's mother wanted to keep Jahi on life support but hospital representatives informed them that long-term life support was not an option.
Hospital spokeswoman Melinda Krigel said that the hospital has no policy about terminating life support. "We work with the family to determine when that will happen," she said in an e-mail. "There are instances when the coroner may request termination, but we always work with the family to respect their wishes."
Attorney Dolan said McMath's family has repeatedly asked doctors for the release of Jahi's medical records so he can hire an independent physician to determine whether she is legally dead. "Their response has been, 'It's not our policy while providing care,'" said Dolan.
In a statement, Children's Hospital denied the family's assertion.
"Jahi's family has the same access to our medical records as the family of any patient at Children's. All families have the right to review the record while the patient is in the hospital, and have access to the entire record after the hospitalization has ended."
Dolan said court intervention was the only remedy to prevent doctors from terminating the life support.
CNN's Mariano Castillo, Tom Watkins and Mayra Cuevas contributed to this report.