Jubilant campaigners have welcomed a ruling by leading judges that Health Secretary Jeremy Hunt does not have the legal power to implement cuts at a major hospital.
Supporters of the successful Lewisham Hospital in south east London cheered as the Court of Appeal announced its decision to dismiss a claim by Mr Hunt that he acted within the law over a decision to downgrade A&E and maternity services.
Lord Dyson, the Master of the Rolls, sitting with Lord Justice Sullivan and Lord Justice Underhill, rejected the Government's challenge against a High Court judge's finding that Mr Hunt had breached provisions of the National Health Services Act 2006.
The July ruling from Mr Justice Silber was won by Lewisham Council and the Save Lewisham Hospital Campaign, an umbrella group supported by patients, community groups, GPs, hospital doctors, nurses and other health professionals.
Mr Hunt said after today's ruling: " I completely understand why the residents of Lewisham did not want any change in their A&E services, but my job as Health Secretary is to protect patients across south London - and doctors said these proposals would save lives.
"We are now looking at the law to make sure that, at a time of great challenge, the NHS is able to change and innovate when local doctors believe it is in the interests of patients."
Shadow health secretary Andy Burnham described the appeal court's decision as a "humiliation" for Mr Hunt.
He said: "Instead of graciously accepting the first court ruling, he has squandered thousands of (pounds of) taxpayers' money trying to protect his own pride and defend the indefensible. He is diminished by this ruling and has let down the NHS."
Rosa Curling from law firm Leigh Day said: "We are absolutely delighted with the Court of Appeal's decision today. It confirms what the Save Lewisham Hospital Campaign has been arguing from the start - that the Secretary of State did not have the legal power to close and downgrade services at Lewisham Hospital.
"This expensive waste of time for the Government should serve as a wake-up call that they cannot ride roughshod over the needs of the people."
Unite, the country's largest union with 100,000 members in the health service, called on the Health Secretary not to repeat the "legal fiasco" at other hospitals in England.
National officer for health Barrie Brown said: "For a Government that is cutting services for the most vulnerable in society, Jeremy Hunt's obsession with pursuing this case to the Court of Appeal, after he had lost in the High Court, is a flagrant waste of taxpayers' money."
The July ruling was a serious blow for Mr Hunt because the case involved the first legal testing of a new Government procedure for dealing with failing NHS organisations - referred to as the unsustainable providers regime.
Under the new regime, Mr Hunt had appointed a trust special administrator (TSA) to the "very badly performing" South London Healthcare Trust, which went into administration after it started losing more than £1 million a week.
To help deal with the problem, the special administrator recommended measures, including cuts at Lewisham Hospital. Mr Hunt told Parliament in January that A&E and maternity services at the hospital would be downgraded.
Mr Hunt assured MPs the changes would improve patient care in south London, saving up to 100 lives a year, but gave an undertaking not to implement them pending the legal challenge.
During the Court of Appeal hearing, Rory Phillips QC, for the Health Secretary and the trust special administrator, argued that they had not acted outside their powers.
He challenged Mr Justice Silber's findings that the TSA was not entitled to recommend the changes to the services at Lewisham and Mr Hunt was not entitled to decide to implement them.
Referring to the 2006 Act, he said that its "wording, statutory context and purpose" should have led Mr Justice Silber "to conclude that they were entitled so to act, consistently with Parliament's evident intention".
Mother-of-three Vicky Penner, who has been involved in the campaign from the outset, said: "We are absolutely over the moon. We are thrilled that justice has prevailed for a second time.
"I was shocked that the Government was arrogant and foolish enough to carry on and try and bully through the closure of our excellent much-needed Lewisham Hospital. The judgment made in July was very clear indeed - that they acted unlawfully - so this is a disgraceful waste of taxpayers' money by Jeremy Hunt."
Royal College of Midwives director for policy, employment relations and communications Jon Skewes said: "We welcome this decision. We were deeply concerned about the consequences of Mr Hunt's decision for the remaining maternity services in south east London.
"London's birth rate is continuing to rise and the occasions when maternity units in the area have had to temporarily close or suspend services is worrying.
"It is important that as much maternity care is provided locally as is possible. This is a victory for mothers, babies and their families in south east London."
Prime Minister David Cameron's official spokesman said: "The Government is disappointed."
Asked if the legal challenge had been a waste of taxpayers' money, he told reporters: "The right thing here has been to put in place the measures that ensure the highest levels of care in this community.
"That has always been the Government's objective."