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.

Get Breaking News Delivered to Your Inbox

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.

My gladiator lay down his shield and gained his wings at 02:30 😥😢😥😢😥 absolutely heartbroken💔😭 I LOVE YOU MY GUY💙💙💙👨‍👦👨‍👦 Posted by Thomas Evans on Friday, April 27, 2018

Later Saturday, Pope Francis tweeted about Alfie's death, saying he is "deeply moved."

"Today I pray especially for his parents, as God the Father receives him in his tender embrace," he tweeted.

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

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

People protest outside Alder Hey Hospital in Liverpool, England, where Alfie Evans was being cared for, on April 13, 2018. Christopher Furlong/Getty Images

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.

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

Supporters prayed for the toddler in St. Peter's Square to show solidarity with his parents, while in Warsaw people placed candles, teddy bears and notes in front of the British embassy.

Emotions have run high over the case, with supporters staging angry protests regularly outside the hospital, at times trying to storm its entrance.

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

Malcolm McMahon, the RC Archbishop of Liverpool, said: "All who have been touched by the story of this little boy's heroic struggle for life will feel this loss deeply."

"Now it is time for us to give Tom and Kate space to grieve their son's death and offer our prayers for him and consolation for all," he said, the BBC reported.