The parents of a brain-damaged baby have been told by a judge their son is brain dead and that his life-support treatment can lawfully be removed.

Four-month-old Midrar Ali was starved of oxygen due to complications at birth and although his heart was restarted he has since remained on a ventilator at St Mary's Hospital in Manchester.

The hospital trust applied to the Family Division of the High Court for a declaration that ventilation be withdrawn to allow him a "kind and dignified death".

Lawyers for the trust submitted that three tests confirmed brain stem death and that an independent consultant had concluded Midrar had no prospect of recovery and would not regain consciousness.

The boy's parents, Karwan Ali, 35, a biomedical scientist, and Shokhan Namiq, 28, from Manchester, disagreed as they believed his brain was continuing to function and want the treatment to continue.

Among the signs of life, they said, was that he continued to grow and that his eyes opened after he was circumcised recently but doctors explained it was an involuntary nerve reaction because the brain was no longer capable of sending signals to the body.

Handing down judgment on Tuesday, Mrs Justice Lieven said the issue she had to decide was whether Midrar is dead, according to death by neurological criteria (DNC) as set out in clinical guidance.

She said: "Sadly, I have no doubt that Midrar is brain stem dead and meets the DNC criteria. The medical evidence is both clear and consistent."

Those tests were "entirely supported" by other evidence that there was no electrical activity in the brain and the stem structure was "fundamentally undermined" which she said was "undoubtedly irreversible".

She went on: "It is perfectly understandable that the parents should cling to hope by pointing to Midrar's movements, including chest movements.

"However, all four consultants who gave evidence said there was an obvious and well-known reason for these movements, namely spinal cord reflexes."

The judge said that on the evidence it appeared his heart and organs continued to function in large part "because of the expert care he has received from staff in the most difficult of conditions".

Noting Mr Ali's examination of medical records and detailed observations of monitoring equipment, Mrs Justice Lieven said: "He and the mother's love and commitment to Midrar cannot be in any doubt.

"However, his desire to cling on to any hope does appear to have led him to interpret material in the way he wanted rather than at times listening to the evidence."

She said the facts of the case were "tragic" and added that "one can only have the greatest sympathy for what the parents are going through".