It was a celebration none of those present expected to see. Charlotte Wyatt, the profoundly disabled baby, marked her second birthday yesterday as her parents learnt they had overturned a court order allowing doctors to let her die if she stops breathing.

The High Court judge Mr Justice Hedley lifted the ruling he made a year ago, saying that it was not required "at present".

Darren and Debbie Wyatt, from Portsmouth, who have fought a battle with doctors over the care of their daughter, welcomed the decision.

A year ago, doctors said Charlotte, who was born brain-damaged with multiple problems, was suffering and was not expected to survive infancy. But the court was told she had made remarkable progress, against medical expectations, and was now able to feel pleasure, had a good smile and a tolerable quality of life.

After the couple's lawyers thanked the judge, he responded by asking those who were heading off for the birthday party to convey to Charlotte in "whatever way they could that others were thinking about her".

Speaking outside the court, Darren Wyatt said: "This is the best birthday present she could ever want, because now Charlotte can get on with her life. We haven't got this huge black cloud hanging over us now."

Yesterday's reversal of the court ruling came after a review last week in which the parents said their daughter had a real chance of longer-term survival that justified medical intervention to keep her alive.

But the judge said doctors "did not take orders from the family" and could not be compelled to artificially ventilate her if that went against their conscience. They should act in Charlotte's best interests, "accommodating parental wishes as far as their professional judgement and conscience will permit, but no further," he said.

"I hope that the trust and confidence of which both Dr K [Charlotte's consultant] and the parents spoke can now develop with a view to securing the best for Charlotte, whether in life or death," the judge said.

Under their ethical code, doctors have a duty only to treat patients where they believe it would be beneficial to the patient and would not unnecessarily prolong suffering. They can refuse to treat a person if they feel it serves no purpose or if the quality of life is deemed to be so low it is not in the patient's interest, but if the family and doctors disagree, the High Court must make a ruling.

Charlotte was born three months prematurely on 21 October 2003 with brain, lung and kidney damage. She needs a constant supply of oxygen and has spent all her life in hospital.

Doctors at St Mary's Hospital in Portsmouth won the legal right not to resuscitate her last year after arguing in court that her brain and other organs were so seriously damaged that she had "no feeling other than continuing pain". They said there was no chance her life could improve and that she would not live beyond infancy. Resuscitating and ventilating her if she had suffered a respiratory crisis triggered by an infection would not have been appropriate because her quality of life was so poor.

Mrs Wyatt, 24, now pregnant with the couple's fourth child, and her husband, Darren, 33, tried and failed several times to get the ruling overturned. Mr Justice Hedley consistently held until yesterday that it would not be right to attempt to revive her with aggressive treatment if she stopped breathing.

A year on, Charlotte has defied medical expectations. She weighed 1lb and was only five inches long at birth.

Her parents described her as a "fighter" and said she now smiles, reaches out to them and tries to talk. Mrs Wyatt said recently: "Charlotte can go outside for 40 minutes in the hospital grounds with an oxygen mask. She can see and hear and she knows who Darren and I are."

A statement issued on the couple's behalf after the ruling, stated: "Darren and Debbie are very happy the order that has been hanging over Charlotte for over a year now has been lifted as it has caused a huge strain on their lives".