A judge in the U.K. on Thursday approved a plan for hospice care for Charlie Gard, the 11-month-old infant battling a rare genetic disease whose situation has sparked wide debate over euthanasia and the rights of both parents and the state, and drawing commentary from both Pope Francis and U.S. President Donald Trump.

The decision comes after the parents decided to abandon their legal battle to bring Charlie to the U.S. for experimental treatment, saying “time had run out.”

Thursday’s ruling means in effect that the infant will die in hospice care, though differences may still remain between the parents and London’s Great Ormond Street Hospital over how much time he should have to live.

Thursday’s order states that the child will remain in the hospital for a “period” before being moved to the hospice, where he will “inevitably” die. Doctors at the hospice can then withdraw artificial ventilation after an unspecified “period” of time, according to the decision.

For legal reasons, the name of the hospice to which Charlie will be moved has not been disclosed.

Prior to the judge’s ruling, the hospital said it has found a hospice willing to care for the infant, but given the invasive nature of the ventilation required to keep him alive, it would be unable to provide it for more than a few hours. The parents, Connie Yates and Chris Gard, said they had found a medical team willing to care for Charlie in hospice for a week.

RELATED: Is British or American view of Charlie Gard tragedy more Catholic?

Charlie’s condition is an inherited mitochondrial disease generally referred to as MDDS, or mitochondrial DNA depletion syndrome. He is unable to move his arms or legs or breathe unaided.

A decision in May by English courts to refuse the parents permission to seek alternative treatments sparked wide debate, with some seeing it as a necessary gesture of compassion for a dying child, and others as an indirect form of euthanasia, as well as an unacceptable form of interference with the rights of the parents to make decisions about their child.

RELATED: Parents of Charlie Gard drop legal fight, saying ‘time has run out’

Gard’s parents attracted support in their legal fight from several prominent quarters, including Pope Francis in a July 2 Vatican statement.

“The Holy Father follows with affection and commotion the situation of Charlie Gard, and expresses his own closeness to his parents,” reads a statement issued by Greg Burke, the pope’s spokesperson.

“He prays for them, wishing that their desire to accompany and care for their own child to the end will be respected.”

That message came three days after a statement released by the Vatican’s Pontifical Academy for Life, signed by Italian Archbishop Vincenzo Paglia, which appeared to express sympathy for the court ruling preventing the parents from taking the child to the U.S. for treatment.

On July 4, Trump tweeted out his own message of support for Gard’s parents, saying, “If we can help little #CharlieGard, as per our friends in the U.K. and the Pope, we would be delighted to do so.”

On July 24, the Vatican released a new statement from Pope Francis.

“Pope Francis is praying for Charlie and his parents and feels especially close to them at this time of immense suffering,” the statement said. “The Holy Father asks that we join in prayer that they may find God’s consolation and love.”

As the debate unfolded, the pope’s own children’s hospital in Rome, Bambino Gesù, also volunteered to provide care for Charlie Gard. After the parents withdrew their legal challenge, the president of the hospital said there was hope to save the infant if time had allowed, and that the legacy of the case would be to move towards a more “personalized model of medicine … for all the Charlies to come.”

RELATED: Pope’s hospital says there was hope to save Charlie Gard if time had allowed

In one measure of the heated emotions surrounding the case, spokespersons for Great Ormond Street hospital said last weekend that staff members have been subjected to abuse, even death threats, as a result of the media exposure.