A judge has ordered an Oakland hospital to keep a 13-year-old girl who was declared brain dead after her tonsil surgery on life support.

The family of Jahi McMath and Oakland Children's Hospital agreed at a hearing Friday to get together and choose an independent neurologist to further examine the girl and determine her condition.

Both sides will be back in court Monday, at which point the judge says he will appoint an independent doctor to examine Jahi.

The McMath family has been granted a temporary restraining order that prevents the hospital from taking Jahi off a ventilator while another opinion regarding her condition is sought. The hospital says it will comply with the judge’s ruling.

The family says doctors at the children's hospital wanted to disconnect life support after Jahi was declared brain dead on Dec. 12. The family says she kept bleeding profusely after the surgery three days earlier, then went into cardiac arrest.

As part of Friday’s ruling, in addition to the ventilator, the 8th grader will continue to receive the intravenous fluids she has been getting.

For the first time after the court hearing, a lawyer for Children’s Hospital spoke out, explaining a bit more of the hospital's position.

Doug Straus said this case is not about a “routine” tonsillectomy. He said the surgery was complicated from the beginning, as three procedures were being done simultaneously. The three surgeries, according to court documents, were: an adenotonsillectomy; a uvulopalatopharyngloplasty, or UPPP, which is tissue removal in the throat; and submucous resection of bilateral inferior turbinates, which is nasal obstruction. The family has previously said the surgery was to help fix Jahi's sleep apnea.

“A young lady has died. No one takes that in a callous or uncaring manner,” Straus told Superior Court Judge Evelio Grillo, “but she is dead.”

When brain death happens, Straus said, it is the hospital’s right to take the patient off life support.

The battle to keep the teen on life support has been escalating in the media since the weekend. And it reached a new height in court on Friday, with the girl's family asking a judge to keep her on life support at least until after Christmas.

“This child is warm. She is soft to the touch. If you rub her foot, her foot curls in. The mother has yelled in her ear, and the daughter has lifted up her arms,” said Chris Dolan, the family’s attorney.

In court papers on Friday filed in probate court in Berkeley, Dolan, on behalf of the family, asked the judge to release the girl's medical records and give her a feeding tube. Dolan also asked the court to give the family 48-hour notice should doctors decide to take her off of life support.

The civil paperwork also shed a bit of light on the way Jahi's mother and relatives have felt treated during this ordeal that both sides would agree is tragic.

While some of the doctors and nurses have been "very compassionate," the temporary restraining order request says that other staff members at the hospital have treated the family "quite coldly." Family said they were told in a blunt manner that "if the ventilator is removed, Jahi will die within a minute or two."

Specifically, Jahi's mother, Latasha "Nailah" Winkfield, singled out Dr. David Durand, chief of pediatrics, in her court request seeking a temporary restraining order against the hospital. In Winkfield's telling of it, Durand said he would not authorize a feeding tube because Jahi is "dead, dead, dead."

"He was condescending and almost angry, as if I were stupid," she wrote. "I am not stupid. I know my daughter, and she is still here."

For its part, Children's Hospital is limited in what doctors can say regarding the escalating battle because of state and federal privacy laws.

Late Thursday, Durand released a statement that read, in part: "We want the public to know that the family has not permitted us to discuss the medical situation. We are unable -- without the family’s permission -- to talk about the medical procedure, background or any of the details that are a part of this tragedy. Details that would provide transparency, openness and provide answers to the public about this situation."

His statement further added that he would love to be able to correct "misperceptions" but hasn't been able to.

Dolan said Jahi's mother doesn't want to give such authorization because she doesn't want the hospital talking about Jahi's condition to the media before she is told anything.

A few other details were revealed in the temporary restraining order request.

Originally, the family was told that Jahi's tonsillectomy and adenoidectomy would be an "in and out procedure."

Sometime after the seemingly uneventful Dec. 9 surgery, Jahi was taken to the ICU and Winkfield said she was told the staff had to fix her ICU. About 45 minutes later, Jahi was brought back to her room and was sitting in bed, bleeding from her mouth.

"It was normal," Winkfield said the nursing staff told her.

Winkfield then said she asked for a doctor. Instead, she said she was given a bigger container for Jahi to bleed into, and later, a suction device to suction out the "increasing volume of blood," the court request states.

Jahi's grandmother, Sandra Chatman, who is a nurse elsewhere, made "multiple" requests for a doctor. But Jahi ended up suffering from a heart attack "and fell into a comatose state," the papers state.

Though she was declared "brain dead," her heart beats and her kidneys function, the church-going family states, and "she is not gone from her body."

Despite two EEG tests earlier this week that proved negative, Jahi's family believes the once-bubbly girl can still recover. They believe in miracles.

In an impassioned written plea to the court, Winkfield wrote: "She is alive. I believe in God and that He can heal all. God created Jahi. He can save her. Help me, please."