LONDON (WDRB) - Charlie Gard, the critically ill British baby at the center of a legal battle that attracted the attention of Pope Francis and U.S. President Donald Trump, has died. He would have turned 1 next week.

Charlie suffered from a rare genetic disease, mitochondrial depletion syndrome, that caused brain damage and left him unable to breathe unaided.

His parents fought for the right to take him to the U.S. for an experimental therapy they believed could prolong his life. But Charlie's doctors at Great Ormond Street Hospital objected, saying the treatment wouldn't help and might cause him to suffer. The dispute ended up in court.

A judge ruled Thursday that Charlie should be transferred to a hospice and taken off life support after his parents and the hospital that had been treating him failed to agree on an end-of-life plan.

British courts and the European Court of Human Rights all sided with the hospital in its bid to remove life support and allow Charlie to die naturally.

Earlier this week Charlie's parents gave up their legal fight, saying the baby's condition had deteriorated so far that the window of opportunity to help him had closed.

They then sought to take their son home to die, but Great Ormond Street Hospital said Charlie's complex needs made that impractical. At an emotional hearing on Wednesday, the judge said Charlie would, inevitably, end his days in a hospice. Yates left the hearing in tears, as the hospital and Charlie's parents continued to disagree on how long he should be kept on life support once he was taken to the hospice.

The case attracted international attention after U.S. President Donald Trump and Pope Francis expressed support for Charlie's parents. U.S.-based religious and anti-abortion activists flew to London to support the family's battle.

Charlie's case has become the catalyst for often emotional debates about health care funding, medical intervention, the role of the state and the rights of the child.

The judge this week condemned social-media commentators who discuss the case without knowing the facts.

Great Ormond Street, one of the world's leading children's hospitals, said the case had been "a uniquely painful and distressing process for all concerned," and it was sorry it had been played out in public.

Copyright 2017 WDRB Media. All Rights Reserved.