LONDON — Alfie Evans, the sick British toddler whose parents won support from Pope Francis during a protracted legal battle over his treatment, died early Saturday. He was 23 months old.

Kate James and Tom Evans made the announcement on social media, saying they were “heartbroken.” The death of Alfie, who had a rare degenerative brain condition that left him in a “semi-vegetative state” with almost no brain function, came five days after doctors removed life support.

Doctors overseeing Alfie’s care in the city of Liverpool said further treatment was futile and not in his best interests, and that he should be allowed to die. But his parents fought for months to try to convince judges to allow them to take him to the Vatican’s children’s hospital so he could be kept on life support. The parents’ campaign was backed by the pope and Christian groups, which helped draw international attention to the case.

The hospital withdrew Alfie’s life support Monday after a series of court rulings sided with the doctors and blocked further medical treatment.

“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.

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.”

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.”

Officials in largely Catholic Poland and Italy have criticized Britain’s courts and state-run National Health Service on the case.

Emotions have run high over the case, with supporters staging angry protests regularly outside the hospital, at times trying to storm its entrance. Supporters began to leave floral tributes outside the hospital Saturday, but Alder Hey asked people to leave tributes in a park next door to ensure 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.”