Shipbuilding unions have welcomed confirmation that eight of the new Type 26 Global Combat Ships are to be built on the Clyde.
But the SNP said the order had been reduced from 13, which it said was a "betrayal" of shipyard workers.
Prime Minister David Cameron made the announcement in the latest defence review.
He also said the UK would design a new class of frigate which would be built in Scotland if it was still in the UK.
The government said the estimated cost of replacing Trident had increased from £25bn to £31bn.
And a new fleet of nine Boeing P-8 Poseidon maritime patrol aircraft will be based at RAF Lossiemouth in Moray.
The aircraft will fill a gap left by the much-criticised decision in the last defence review, in 2010, to scrap a new generation of Nimrod aircraft.
The prime minister said the defence review meant that Scotland "now has the opportunity to build more than 13 frigates" despite the reduction in the number of Type 26s, which are due to be built at BAE's Govan and Scotstoun yards on the Clyde from next year.
What is the Type 26 Global Combat Ship?
- According to BAE, the Global Combat Ship will be a "highly capable and versatile multi-mission warship" designed to support anti-submarine warfare, air defence and general purpose operations anywhere on the world's oceans.
- The Type 26 will replace the UK's Type 23 frigates, with the first due to enter service in the early 2020s.
- Each ship will carry a crew of 185, have a top speed of 28 knots and a range of 7,800 nautical miles.
- In February, the MoD signed an £859m initial development deal with BAE
- It said the move would "support progression" towards the manufacturing phase of the new Type 26 Global Combat Ship.
- The UK government said at the time that the contract would safeguard 1,700 UK jobs, including 600 in Scotland, at both BAE Systems and its supply chain.
- The Better Together campaign had warned during the referendum campaign that it was unlikely the frigates would be built on the Clyde if Scotland voted for independence
Mr Cameron said: "There will be eight of the Type 26s and at least another five of the new type of frigate, probably more, and they can be built in Scotland if the conditions are right.
"The only way these ships wouldn't be built in Scotland is if Scotland was independent and didn't have the national resources of the Royal Navy."
Mr Cameron also told the House of Commons that the new class of frigates would be "more affordable than the Type 26 which will allow us to buy more of them for the Royal Navy so that by the 2030s we can further increase the total number of Royal Navy frigates and destroyers."
Ahead of the announcement, the SNP had said that any reduction in the number of Type 26 frigates being built on the Clyde would be a "betrayal" of the workforce.
The party's defence spokesman at Westminster, Brendan O'Hara, said: "There is much in this defence review that is deeply troubling and the workforce at the shipyards on the Clyde will feel betrayed by the huge cut in the number of Type 26s to be ordered.
"It will not be forgotten that the UK government promised 13 would be built - a cast iron guarantee. The UK government has today confirmed a 40% cut in that pledge."
But Trade union GMB Scotland welcomed the prime minister's announcement, stating that it would secure employment.
Jim Moohan, the union's senior organiser and chair of the Confederation of Shipbuilding and Engineering Unions said: "Once again this is great news for Clydeside, which has been rewarded for its continuing quality of work produced by the skills and experience heavily invested in by BAE Systems.
"Instead of the peaks and troughs which caused redundancies in the past, we now have continuity.
"This should be welcomed and not used for political mischief by those who have no knowledge in this area of industry and whose vision going forward was a dated Type 42 Destroyer to be the sole protection for Scottish waters in the event that the referendum question had answered Yes."
BAE Systems chief executive Ian King said the announcement "provides continuity and stability for our business."
The government also disclosed that replacing the Royal Navy's ageing fleet of submarines that carry the UK's Trident nuclear weapons could cost up to £40bn.
The Ministry of Defence now estimates that acquiring four new submarines, which are based on the Clyde, will cost £31bn over the course of the 20 year procurement programme - compared to a previous estimate of £25bn.
And a further £10bn "contingency" has been set aside to meet additional unexpected cost increases, reflecting the complexity of the project, with the first submarine due to enter service in the early 2030s, the SDSR said.
What is the Boeing P-8?
- The P-8 Poseidon is a modified version of Boeing's 737-800 passenger aircraft that has been heavily adapted for military use.
- Originally developed for use by the US Navy, it was fully introduced into service in November 2013.
- It is designed for long-range anti-submarine warfare; anti-surface warfare; and intelligence, surveillance and reconnaissance missions.
- The aircraft can carry and launch torpedoes, depth charges, SLAM-ER missiles, Harpoon anti-ship missiles, and other weapons.
- It can also drop and monitor sonobuoys, which are used to help locate and trace submarines.
- The P-8 can fly at altitudes of up to 41,000 feet and at speeds of up to 490 knots (560mph)
- It can fly up to 4,500 miles from its base without refuelling.
- As well as the US Navy, the P-8 is currently in use by the Indian Navy, with the aircraft also due to enter service with the Royal Australian Air Force next year.
The report said: "The revised cost and schedule reflect the greater understanding we now have about the detailed design of the submarines and their manufacture."
The SNP's leader at Westminster, Angus Robertson, asked the prime minister: "As we learn its replacement is ballooning and will be squeezing out defence alternatives, how expensive does Trident need to be for this government to realise that it is a super expensive vanity project that does not deter?"
Mr Cameron responded: "It is clearly not squeezing out other defence requirements as this document so clearly shows today."
Downing Street has said that the purchase of the Boeing P-8 maritime patrol aircraft will increase protection of the UK's nuclear deterrent and its latest aircraft carriers when they come into service.
The BBC's defence correspondent Jonathan Beale said RAF Lossiemouth had been chosen for the new patrol aircraft in preference to another RAF base in Lincolnshire.
The UK's fleet of Nimrod surveillance aircraft were formerly based at RAF Kinloss in Moray.
An upgraded version of the Nimrod, the MRA4, had been due to enter service in 2012 but the plans were cancelled in the 2010 defence review.
The planes, costing a total of £4bn, were later broken up and scrapped despite warnings from former defence chiefs that it would leave a hole in Britain's defence capability.
The cancellation of the Nimrod led to the closure of RAF Kinloss, although the site is still used by the MoD as an Army base.
The Ministry of Defence is currently having to rely on French and Canadian aircraft during a search after a reported sighting of a Russian submarine off the Scottish coast.