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

LONDON — The parents of British baby Charlie Gard on Monday ended their legal fight for an experimental U.S. treatment that they hoped might improve his condition.

Chris Gard, the boy's father, said they are "truly devastated" and blamed the length of the court case for preventing them securing the treatment.

"We will have to live with the what-ifs, which will haunt us for the rest of our lives," said a tearful Gard. "Our son is an absolute warrior, and we will miss him terribly."

The parents had made the decision to end the legal battle following the latest medical reports and scans, although they said that the U.S. and Italian hospitals that could conduct the treatment were still willing to help.

"This is about a sweet, gorgeous, innocent little boy, who had a genuine chance at life, that’s why we fought so hard for him," said Gard.

"We are now going to spend our last precious moments with our son Charlie, who won’t make his first birthday in just under two week’s time."

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

Connie Yates and Chris Gard, the parents of Charlie Gard, arrive at the Royal Courts of Justice in London on July 24. Chris J. Ratcliffe / AFP - Getty Images

The decision to end the legal battle came as proceedings were due to resume in the case.

Charlie's mother, Connie Yates, said they simply wanted to give Charlie "a chance of life."

"Charlie did have a real chance of getting better," Yates told the court earlier Monday, according to Reuters. "Now we will never know what would have happened if he got treatment."

A judge had been expected to rule this week on whether the family could pursue the U.S. treatment against the advice of British doctors who believe it would cause the child more suffering.

Charlie was diagnosed with a rare genetic condition, an inherited mitochondrial disease generally referred to as MDDS, or mitochondrial DNA depletion syndrome. He is unable to move his arms or legs or breathe unaided.

The child’s parents raised $1.8 million to bring him to the U.S. They had previously said that if the money couldn't go towards Charlie's treatment, it would be donated to help other children with similar genetic conditions.

"The agony, desolation and bravery of their decision command GOSH’s utmost respect and humble all who work there," London's Great Ormond Street Hospital (GOSH) in a statement.

"Whilst GOSH has striven to work with them throughout, Charlie’s needs have taken priority. It is greatly hoped that in the days ahead, it will be possible to extend to his parents the same quality of care with which Charlie has been provided and to concentrate on the family as a whole."

Earlier this month, the court heard from Michio Hirano, a professor of neurology at Columbia University in New York City, who has said that there was a 10 percent chance of "clinically meaningful success" if the child was allowed to undergo the experimental treatment his parents are seeking.

The hospital said that it would now give "careful thought to what they can learn from this bruising court case that might enrich the care it provides to its most vulnerable patients and families."

The case has drawn international attention, with Pope Francis and President Donald Trump both expressing support for the family.

The Vatican press office said, "Pope Francis is praying for Charlie and his parents and feels especially close to them at this time of immense suffering. The Holy Father asks that we join in prayer that they may find God's consolation and love."

With passions running high on both sides, GOSH said over the weekend that staff have been subjected to abuse and even death threats as a result of the high-profile case.