Jim Wilson/The New York Times  Nailah and Martin Winkfield, the girl's parents, on Friday. A judge mediated an agreement between the family and Childrenâs Hospital Oakland.  SAN FRANCISCO â It started out as an operation to treat an increasingly common medical problem in America, childhood sleep apnea. It has become an anguished fight over the fate of a 13-year-old girl who, though pronounced legally dead by doctors, remains alive in the opinion of her religious parents.  The girl, Jahi McMath, was declared brain-dead after complications from surgery on Dec. 9 at Childrenâs Hospital Oakland, which wanted to remove her from a ventilator. But her heart continues to beat, and her family protested the removal in court, so she has remained connected to the machine.  On Friday, amid acrimonious battles in three courts, an Alameda County Superior Court judge mediated an agreement that could allow the child to be moved to another facility willing to take her, even though the hospital has declared her dead.  As arguments in the courts continue, the girl will remain connected to the ventilator at least until Tuesday, under the judgeâs order. In the meantime, family members are scrambling to identify a facility that will accept the girl and doctors willing to carry out procedures that will keep her heart beating during the transfer.  Nailah Winkfield, the girlâs mother, said she was hopeful that Fridayâs agreement would facilitate her daughterâs move.  âI believe in God, and I believe that if he wanted her dead, he would have taken her already,â Ms. Winkfield, a Baptist, said by phone. âHer heart is beating, her blood is flowing. She moves when I go near her and talk to her. Thatâs not a dead person.â  Jahi was admitted to Childrenâs Hospital last month, and underwent three surgical procedures that included removing her tonsils and adenoids. She subsequently âsuffered serious complicationsâ that resulted in her death, according to court documents submitted by the hospital. The familyâs lawyer said in a court filing that Jahi suffered âlarge blood loss and, as a result, she suffered a heart attack and a loss of oxygen to her brain.â  The hospital determined two days later that the girl was legally dead, and later sought to remove the ventilator. The family objected, asserting that the heartbeat was proof that she remained alive. In a document filed in Federal Court, the familyâs lawyer stated that the girlâs parents are âChristians with firm religious beliefs that as long as the heart is beating, Jahi is alive.â  Doctors who have examined the girl, including a court-appointed neurologist, have all declared her brain-dead. The judge issued a temporary restraining order blocking the hospital from removing her from the ventilator. The order was extended until Tuesday.  Judges in three separate courts have turned down the familyâs request to order Childrenâs Hospital to insert tracheotomy and feeding tubes so she can be transported to another facility. Hospital officials have said that they would not allow the procedures to be carried out on the premises.  The family has attacked the hospital, saying it is effectively standing in the way of Jahiâs move to another facility.  âWe just want them to get out of the way,â said Omari Sealey, the girlâs uncle.  Christopher Dolan, the familyâs lawyer, said a few facilities had agreed to accept Jahi, including the New Beginnings Community Center in Medford, N.Y. The center, which treats people with traumatic brain injury and other disabilities, did not return calls seeking comment, but said on its website that Jahi âhas been defined as a deceased person yet she has all the functional attributes of a living person despite her brain injury.â It did not say whether it was prepared to admit the girl.  Under the agreement reached Friday, the hospital will release the girl to the Alameda County coroner, a move that will officially classify the girl as dead, before the family can transfer Jahi elsewhere.  âIt is hard for a mother to receive a death certificate for a child who has a heart beating,â Mr. Dolan said. âItâs an awkward situation.â  The agreement does not require the hospital to perform the procedures that will help the girlâs heart to keep beating during the transfer, or to allow an outside doctor to carry them out on hospital premises, as Mr. Dolan had requested.  âThis is an important medical and legal victory for our hospital and all medical facilities, that they canât be forced to perform surgery,â said Sam Singer, a spokesman for Childrenâs Hospital.  Lt. Riddic Bowers of the Alameda County Coronerâs Bureau said that once the bureau issued a death certificate and a release form, a deceased personâs relatives were free to dispose of the body according to their wishes.  David Magnus, director of the Stanford Center for Biomedical Ethics, said it was unlikely that a long-term care facility would accept a patient who has been issued a death certificate.  âThereâs no reported case of a correct diagnosis of brain death where anybody comes back,â he said. He added that while death occurs after an hour because of a lack of blood flowing into the brain, Jahi has not had blood flowing into her brain since at least Dec. 12.  This article has been revised to reflect the following correction:  An earlier version of a picture caption with this article misidentified the husband of Nailah Winkfield. He is Marvin Winkfield, not Martin.
A court was called to intervene after a California hospital pronounced a girl dead after complications from surgery but her family insists she is alive.