Scots Secretary Jim Murphy broke the news to workers at the Ministry of Defence range on Benbecula in the Western Isles.

Western Isles Council said Mr Murphy had announced that the MoD had rejected rationalisation plans by defence firm QinetiQ which would have cost 125 jobs.

Council leader Angus Campbell said: “This is good news for the Western Isles.”

He said the proposals would have damaged “irreparably” the UK’s defence capability and the fragile local economy.

The council leader said: “The UK Government has listened and recognised the validity of the case we have been making.”

He said the council would continue to call for the MoD to review a long-term agreement with QinetiQ which prevented either party from exploring “more ambitious” options to make the UK a world leader in technology for unmanned “drone” aircraft.

Mr Campbell said: “We must continue to make the case for the range as a prime asset for the UK and one that could and should be developed.

“In addition the economy of the Uists must be strengthened and diversified.”

The reprieve was welcomed by the Western Isles MP and MSP, Angus MacNeil and Alasdair Allan, both SNP.

They said they now wanted long-term guarantees over the future of the facility - and an apology for the workers and families who endured months of uncertainty.

Dr Allan said: “This climbdown is a huge relief for the workers and their families, and a tremendous victory for the community campaign to save these jobs.”

He went on: “This is great news for the Western Isles and a great victory for the campaign and for common sense but it is deeply disappointing that the UK Government allowed the community to go through the trauma of a closure threat in the first place.

“UK ministers still have questions to answer over why adverts appeared seeking a project manager to oversee the downgrading.

“This was deeply disheartening for the people of the Western Isles. From beginning to end, this has been a chaotic and cruel way to treat a workforce and community.”

Confirming the announcement, Mr Murphy said: “This is the right decision for the right reasons and a victory for common sense.

“The potential savings to the MoD were not worth the cost to the island’s economy.”

He thanked defence ministers Bob Ainsworth and Quentin Davies for reaching the decision.

“Scotland’s island communities may be separate from the UK mainland but they are not separate from the UK, and today’s decision confirms again that Scottish families benefit from being part of the United Kingdom through MoD jobs,” said Mr Murphy.

“During the consultation I have been impressed by the task force’s professionalism and also their sense that the local economy has real strengths and can diversify in the future, particularly into renewable energy where there is huge potential.”