Critically ill baby Charlie Gard, whose medical and legal story in Britain sparked compassion and controversy around the world, has died.

The Daily Mail first reported the death, citing the boy's mother, Connie Yates.

The child, who had a rare genetic disease called mitochondrial depletion syndrome, died just days shy of his first birthday. Charlie required a ventilator to breathe and was unable to see, hear or swallow.

His parents, Yates and Chris Gard, raised more than £1.3 million ($2.1 million Cdn) to take him to the United States for experimental therapy they believed could prolong his life. But Charlie's doctors at Great Ormond Street Hospital in London objected, saying the treatment wouldn't help and might cause him to suffer. The dispute ended up in court.

"Our beautiful little boy has gone, we are so proud of you Charlie," Yates was quoted as saying by the Daily Mail.

The case became a flashpoint for debates on health-care funding, medical intervention, the role of the state and the rights of children.

The case made it all the way to Britain's Supreme Court as Charlie's parents refused to accept decisions by a series of judges who backed Great Ormond Street. But the Supreme Court agreed with the lower courts, saying it was in Charlie's best interests that he be allowed to die.

Chris Gard, left, and Connie Yates, the boy's parents, read a statement praising their son on July 24, the day they announced they were ending their bid for experimental treatment. (Matt Dunham/Associated Press)

The case caught the attention of U.S. President Donald Trump and Pope Francis after the European Court of Human Rights refused to intervene. The two leaders sent tweets of support for Charlie and his parents, triggering a surge of grassroots action, including a number of U.S. right-to-life activists who flew to London to support Charlie's parents.

His parents gave up their fight earlier this week after scans showed that Charlie's muscles had deteriorated so much that the damage was irreversible.

The final battle between the two sides concerned where Charlie would spend his last hours.

High Court Judge Nicholas Francis ruled Thursday that Charlie should be transferred to a hospice and taken off life-support after his parents and the hospital failed to agree on an end-of-life care plan for the infant.

It was not immediately clear if the child died in hospice.

Condolences from around the world

On Friday night, the hospital offered its condolences to Charlie's family.

"Everyone at Great Ormond Street Hospital sends their heartfelt condolences to Charlie's parents and loved ones at this very sad time," the hospital said in a statement.

I entrust little Charlie to the Father and pray for his parents and all those who loved him. —@Pontifex

Pope Francis offered his sympathies to Charlie's parents.

The leader of the Catholic Church posted a tweet saying, "I entrust little Charlie to the Father and pray for his parents and all those who loved him."

Last month the Pope intervened in the case, saying that the wishes of the parents should be taken into account.

Jeanne Mancini, leader of the U.S.-based March for Life, offered her "thoughts and prayers" for the family "whose admirable fight for their child's right to life has had a profound and lasting impact on the entire world."

Catholic groups and right-to-life organizations are expressing their sadness at the death.

The Catholic Association, a religious organization that campaigns against abortion and assisted suicide, also offered its sympathies. Maureen Ferguson, its senior policy adviser, said "our hearts go out to the Gard family, who not only have suffered the loss of their precious baby boy, but have had to endure the interference and obstruction of the courts."

'Saddened to hear of the passing of Charlie Gard. Karen and I offer our prayers and condolences to his loving parents during this difficult time,' - U.S. Vice-President Mike Pence

Following news of Charlie's death, U.S. Vice-President Mike Pence posted on Facebook: "Saddened to hear of the passing of Charlie Gard. Karen and I offer our prayers and condolences to his loving parents during this difficult time."

The intervention of two of the world's most powerful men made the case a talking point for the planet. Images of Charlie hooked to a tube while dozing in a star-flecked navy blue onesie graced websites, newspapers and television news programs.

Medical ethicist Arthur Caplan said the Charlie Gard case shows how the medical profession is struggling to adjust to the age of social media, which puts the general public in the middle of decisions that in the past would have been private issues for doctors and the family.

"I do think that in an era of social media, it is possible to rally huge numbers of people to your cause," said Caplan, of New York University's Langone Medical Center. "The medical ethics have not caught up."

The heated commentary prompted the High Court judge to criticize the effects of social media and those "who know almost nothing about this case but who feel entitled to express opinions."

'Sleep tight'

In giving up the fight to move him, his parents offered a final goodbye.

"Mummy and Daddy love you so much Charlie, we always have and we always will and we are so sorry that we couldn't save you," his parents wrote when they announced their decision. "We had the chance but we weren't allowed to give you that chance.

"Sweet dreams baby. Sleep tight, our beautiful little boy."