The parents of a seriously ill baby who started trying to breathe after doctors decided he was dead are waiting for a High Court judge’s ruling on a life support dispute.

Bosses at a London hospital trust responsible for the four-month-old boy’s care became involved in a treatment dispute with his parents earlier this summer and asked a judge to consider the case.

Lawyers representing Guy’s and St Thomas’ NHS Foundation Trust said tests showed that the boy, who has suffered a serious brain injury and is on a ventilator, was brain stem dead and wanted a declaration of death.

But they subsequently returned to court and told Mr Justice Hayden that a nurse had noticed the boy trying to breathe, more than a week after doctors had carried out brain stem tests and concluded he had died.

Specialists rescinded “the clinical ascertainment of death” and trust bosses asked Mr Justice Hayden to decide instead what moves were in the boy’s best interests.

The judge oversaw a trial in the Family Division of the High Court in London on Thursday and is due to deliver a ruling on Friday.

Barrister David Lawson, who led the hospital’s legal team, told Mr Justice Hayden that the boy was dying.

Mr Lawson said the boy had suffered a “devastating” brain injury and asked the judge to rule that he should now follow a “palliative care pathway”.

A specialist told the judge nothing could be done to help the boy.

The boy’s parents, Muslims of Bangladeshi origin, want him to remain on a ventilator.

Detail of the case – and the boy’s attempts at breathing – emerged in July when Mr Justice Hayden considered evidence at an online hearing.

He said at the time that the baby’s parents regard what happened as a “miracle”.

But he also said evidence indicated the boy was “not likely” to recover.

The judge said it is important that what occurred is put “into the public domain” because it might prove to have “wider resonance”.

He said the circumstances were “entirely unforeseen” and unprecedented in his experience.

Mr Justice Hayden has ruled that the boy, referred to as A in court papers, cannot be identified in media reports of the case.

Have you got a story for us? You can contact us here.

Follow us on FacebookTwitter and Instagram to keep up with all the latest news.

Sign up to our newsletters to get updates sent straight to your inbox.