The 69-pound woman has battled anorexia for the majority of her life. In her preschool dance classes, she compared the size of her thighs to other girls’ limbs, and when she was 13, she started purging.

Earlier this month, after spending nearly two years in a New Jersey psychiatric hospital, the 29-year-old woman with a bone density of a 92-year-old told a court that she refused to eat any food, and wished to enter palliative care instead, which focuses on the comfort of the seriously or terminally ill.

A Superior Court judge ruled Monday that she cannot be fed against her will, and it is in her best interest to be transferred to a palliative care unit.

In a 140-minute opinion delivered orally at the bench, and shaped by landmark court decisions on personal self-determination, Morris County Judge Paul Armstrong called the woman’s testimony, “forthright, responsive, knowing, intelligent, voluntary, steadfast and credible,” the Wall Street Journal reported. Therefore, he ruled, the woman, referred to only as A.G., has the mental capacity to choose not to accept nutrition.

The state, which runs the psychiatric hospital where A.G. resides, argued the woman is mentally ill due to depression, and that by approving the withdrawal of force-feeding the court would essentially be allowing her passive suicide, the Daily Record reported. Palliative care would simply provide drugs to numb her pain and ease her own death, wrote Deputy Attorney General Gene Rosenblum.

In court papers, A.G. has said she is prepared to die but also envisions living an independent life. The 5-foot-6-inch-tall woman said she believes any weight about 70 is too much for her, and force-feeding is an effort to make her fat, wrote Peggy Wright, a Daily Record reporter, in an earlier article.

Her treating psychiatrist, Joshua Braun, said force feeding A.G. would be “cruel and torturous at this point,” because restraining her could cause her delicate bones to break, the Daily Record reported. Force feeding would require a tube to be inserted through A.G’s nose and pushed down her throat, possibly three times a day, the Wall Street Journal reported.

The woman could live several months or years without medical intervention, according to Edward G. D’Alessandro Jr., A.G’s court-appointed lawyer. She absorbs some nutrition through bingeing and purging, the Wall Street Journal reported.

Armstrong, the judge, said that during an interview with A.G. on Nov. 3, she “expressed an unequivocal desire to accept palliative care as suggested by her treating physician and the bioethics committee at Morristown Medical Center.

“This decision was made by A.G. with a clear understanding that death was or could be the possible outcome,” Armstrong said.

In his opinion, Armstrong referenced landmark patient rights cases, most notably the right-to-die case of Karen Ann Quinlan, whose parents Armstrong represented. In 1976, the New Jersey Supreme Court ruled that the respirator thought to be keeping alive a comatose, 22-year-old Karen Quinlan could be turned off. Quinlan, who ended up living for another 10 years, became a symbol nationwide for those kept alive only with modern medical technology.

The lessons from cases like Quinlan’s, Armstrong said in court Monday, “are that patients, their families, physicians, and their institutions remain proper cooperators in making the evolving and necessary difficult decisions fronting modern medicine.”

It is unclear whether the state will appeal Armstrong’s decision.

A.G.’s battle with anorexia was first brought to court in June, when the New Jersey Division of Law filed a complaint alleging the woman wasn’t able to give consent for medical care for her eating disorders. Her appointed temporary guardian, Susan Joseph, requested and received a court order in June that A.G. be fed artificially. The nutrition program helped her gain nearly 30 pounds, but she suffered heart failure as result of “re-feeding syndrome,” the Daily Record reported. A.G. pulled out the tube herself.

Since then, she has been getting by primarily on liquids, as well as occasional bites of food. In October, Joseph requested that the court allow A.G. to be transferred to palliative care, which the state Department of Human Services opposed.

In a hearing on Nov. 4, A.G.’s mother testified that she and her husband had done all they could for more than 10 years to treat their daughter’s anorexia, admitting her to facilities, attending therapy sessions with her and managing her medications.

In November 2013, A.G. was found passed out in a hotel after drinking alcohol and overdosing on an antipsychotic drug, according to court records. She was hospitalized and then committed to a state psychiatric hospital in January 2014.

A.G.’s mother said she accepts her daughter’s decision, since A.G. has been unable to “take the treatment and thrive,” the Daily Record reported.

“The thoughts of this whole process are running through her head and she has no peace,” A.G.’s mother said. “She never seems to have a moment where she’s just relaxed. She’s tormented.”

More from Morning Mix:

Driver in Chattanooga bus crash arrested, charged; at least 5 children killed, officials say

Kanye West hospitalized in Los Angeles, placed on psychiatric hold

Trump, breaching protocol, suggests his buddy Nigel Farage as ambassador to U.S. ‘No vacancy’ says British P.M.