Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

LONDON — Alfie Evans, a sick British toddler whose parents won support from the pope during a protracted legal battle to take him to the Vatican children's hospital for treatment, died early Saturday, five days after he was taken off life support.

The parents, Kate James and Tom Evans, announced their 23-month-old son's death on social media, saying they were "heartbroken." Alfie had a rare degenerative brain condition that left him with almost no brain function, and multiple courts ruled that keeping him alive was not in his best interests.

"My gladiator lay down his shield and gained his wings at 02:30," Evans, 21, said in Facebook post decorated with a broken heart and crying emojis.

Alfie's case sparked a medical ethics debate that resonated far beyond Britain. Doctors overseeing his care in Liverpool, England, said further treatment was futile and he should be allowed to die. But his parents fought for months to try to convince judges to allow them to take him to Vatican hospital, where life support would be maintained.

Pope Francis, who had publicly supported Evans and James' campaign, wrote a condolence that was posted on Twitter Saturday.

"I am deeply moved by the death of little Alfie," Francis said. "Today I pray especially for his parents, as God the Father receives him in his tender embrace."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

I am deeply moved by the death of little Alfie. Today I pray especially for his parents, as God the Father receives him in his tender embrace. — Pope Francis (@Pontifex) April 28, 2018

The death came after an easing of tensions between the family and the hospital. Evans had pledged to work with doctors to give his son "dignity and comfort," as he called for a truce in the divisive case.

"Our lives have been turned upside down by the intense focus on Alfie and his situation," Evans said Thursday outside Liverpool's Alder Hey Children's Hospital, where Alfie has been treated for more than a year.

He thanked the hospital staff "for their dignity and professionalism during what must be an incredibly difficult time for them too."

British toddler Alfie Evans on April 5, 2018 at Alder Hey Children's Hospital in Liverpool. Evans died on April 28, 2018 after doctors withdrew life support. ACTION4ALFIE/AFP/Getty Images ACTION4ALFIE / AFP - Getty Images

It was a strikingly different tone from the one he struck earlier, when he said doctors were wrong about Alfie's prognosis and threatened to resume his fight in court.

Under British law, courts are asked to intervene when parents and doctors disagree on the treatment of a child. In such cases, the rights of the child take primacy over the parents' right to decide what's best for their offspring.

Alder Hey issued a statement to express "heartfelt sympathy and condolences to Alfie's family."

"All of us feel deeply for Alfie, Kate, Tom and his whole family and our thoughts are with them," the statement said. "This has been a devastating journey for them and we would ask that their privacy and the privacy of staff at Alder Hey is respected."

Alfie's case received much attention outside Britain, especially in Catholic countries. Pope Francis, who had met with Evans, appealed for the wishes of the boy's parents to be heeded, saying only God can decide who dies. Italy even granted Alfie citizenship and put a military plane on standby to transport him to Rome if the courts allowed it.

Italian Foreign Minister Angelino Alfano tweeted Saturday: "Goodbye, little Alfie. We loved you."

A leading Italian right-wing politician, Veneto Gov. Luca Zaia, said the "so-called civilized world has supplied the latest proof of enormous incivility."

People prepare to release balloons in memory of Alfie Evans outside Alder Hey Hospital after the terminally ill 23-month-old died on April 28, 2018 in Liverpool, England. Christopher Furlong / Getty Images

Officials in largely Catholic Poland and Italy have criticized Britain's courts and state-run National Health Service.

Supporters of the parents staged angry protests regularly outside the hospital, at times trying to storm its entrance. People left floral tributes outside the hospital Saturday, but Alder Hey asked for remembrances to be left in a park next door so the hospital's work wasn't disrupted.

Alfie's mother, 20-year-old Kate James, posted that she was heartbroken over Alfie's death but added, "Thank you everyone for all your support."