A £5.4bn Royal Navy project to build two aircraft carriers has been given the go-ahead, it has been confirmed.
There had been fears the deal would be axed as part of the spending review.
However, Prime Minister David Cameron told MPs that it would have cost more to cancel the second carrier that it would to build the vessel.
Deputy Prime Minister Nick Clegg had earlier visited the Rosyth dockyard in Fife, where the carriers will be assembled, to meet staff.
He was joined by Scottish Secretary Michael Moore as they reassured workers that their jobs were safe.
Addressing the House of Commons, Mr Cameron attacked the terms of the contract signed by the former Labour government.
He said the designs agreed meant the carriers would have been unable to work effectively with key defence partners, namely the United States and France.
He added: "They had failed to plan so that carriers and planes would arrive at the same time.
"They ordered the more expensive and less capable version of the joint-strike fighter to fly off the carriers and they signed contracts so we were left in a situation where even cancelling the second carrier would actually cost more than to build it."
Confirming that the carriers would be built, Mr Cameron said he would act in the "national interest" but added: "we would not have started from here but the right decisions are now being made in the right way and for the right reasons."
The prime minister said both carriers would be built but one would be held in "extended readiness".
The vessels are currently under construction in Portsmouth, Devon, Merseyside and Tyneside, with two Clyde yards building the largest sections for assembly at Rosyth.
Deputy Prime Minister Nick Clegg had earlier told workers at Rosyth, that by safeguarding the contract for HMS Queen Elizabeth and HMS Prince of Wales, thousands of jobs in Fife and on the Clyde had been secured.
He told them: "There are many thousands of people in the Forth, the Clyde and down in Portsmouth dependent on these contracts and they were very worried about the uncertainty.
"I think they are very relieved now that finally the decision has been taken to proceed, if in a slightly different way, with the construction of the aircraft carriers."
Bernie Hamilton, Unite's national officer for Aerospace and Shipbuilding, said that despite the news that the carriers would be built, uncertainty remained.
He said: "The decision to complete the two aircraft carriers is welcome news, but a carrier that carries no planes is bizarre.
"Any further reductions to the surface fleet will cause major concerns across the workforces at Portsmouth, Rosyth and Devonport dock yards.
"David Cameron leaves many questions unanswered. We have no details on numbers of joint strike fighters and Typhoon Tranche 3B aircraft which leaves workforces across the UK feeling uncertain about their futures."