A juvenile district court judge ruled Thursday that Amber Rose Pacheco be removed from life support after doctors testified she had no hope of recovery and no neurological function except for an occasional gasp.

The judge acted on a request by an attorney serving as Amber's legal guardian after CPS took permanent custody of her Monday.

An autopsy by the medical examiner's office was planned, after which Amber's body will be returned her father's family, Gonzales said.

Amber's death Friday brought sadness, but also relief that she is finally at peace, Gonzales said.

"Everyone who was involved in this case has had a really hard time with it," she said. "You never want to say that one case is worse than another because they're all tragic. I think this one was made a little worse by the fact that she lingered so long."

The girl's mother and stepfather, Hope and Jason Pumphrey, are being held on injury to a child charges in lieu of $1 million bail. The couple could face capital murder charges now that the girl has died.

Dallas police planned to review the autopsy results to examine the extent of Amber's injuries and meet with the Dallas County district attorney's office next week to decide whether to upgrade the charges to capital murder, spokesman Sr. Cpl. Chris Gilliam said.

A spokeswoman with the district attorney's office said a hearing in the case by a grand jury is pending.

The couple took Amber to Children's Medical Center on Aug. 18 with head trauma, a fractured skull and broken pelvis, arm and ribs. Authorities said the couple told them the girl was possessed by a demon and that they had earlier taken her to a church to ask for help.

Hope Pumphrey gave birth to Amber while she was in jail on drug charges, according to CPS. She voluntarily gave the child to Rosa Pacheco, the paternal grandmother, to raise.

CPS says caseworkers followed up with the grandmother and the child was "happy and healthy and thriving." CPS isn't sure when the grandmother gave the child back to the mother.

The girl's father and grandmother had supported her being taken off life support. Her mother did not comment on the decision. The girl's stepfather, who denies harming her, told The Dallas Morning News that he did not want her removed from life support because he had hope she'd recover.