The race to design and build a new generation of Royal Navy frigates has been won by engineering firm Babcock.
It has been named preferred bidder for the £1.25bn contract for five Type 31 warships.
The deal secures hundreds of jobs at Rosyth in Fife, where the ships will be assembled, with construction work expected to be spread between yards across the UK.
Work is to begin by the end of 2019, with the first ships delivered in 2023.
The Type 31 is a smaller, cheaper frigate than the Type 26 warships currently being built at the Upper Clyde shipyards.
With a price ceiling of £250m per ship, the aim is to maintain the size of the Navy's surface fleet and generate export orders.
Prime Minister Boris Johnson said the modular construction method would support 2,500 jobs throughout the UK.
He said the UK was "a great shipbuilding nation" and that there were "all sorts of ways" in which UK naval vessels were helping the modern world.
He added: "What it delivers is high quality jobs for young people - really high-skilled jobs for young people in this country - but also massive export opportunities of vessels that not only help to keep the peace but tackle piracy, help dealing with immigration issues across the seas."
The Babcock team's Arrowhead 140 design beat competition from a Cammell Laird/BAE Systems consortium and a bid led by Atlas Elektronik UK.
The winning consortium also includes Thales and BMT, as well as Ferguson Marine, based in Port Glasgow, and Harland and Wolff in Belfast - both of which are currently in administration.
Last month, Babcock insisted these firms' financial difficulties would not affect its bid because its "flexible build approach" could accommodate "a range of delivery sites".
Scotland's Economy Secretary Derek Mackay said the awarding of the contract was "testament to the skilled workforce and expertise which we have in Scotland".
He added: "I have spoken with Babcock this morning to assure them they have the full support of the Scottish government.
"Once the final details of the contract are announced, we look forward to discussions on the role that Ferguson Marine could play alongside other suppliers in Scotland."
Unions also welcomed the announcement, with Unite saying it would secure hundreds of jobs at Rosyth "for well over a decade". GMB Scotland said it was "excellent news", adding that the team that put the bid together "should be congratulated".
Type 31 - the 'Lidl frigate'
By Calum Watson, BBC Scotland news
Three different designs were in the running for the Type 31 contract but they all have something in common - they're cheap.
The price cap of £250m per ship might sound a lot of money but, to put it in context, the bill for the eight Type 26 frigates currently under construction comes to about £8bn.
The extremely tight cost constraints on the new ship have led some critics to describe it as "the Lidl frigate".
Each bidder has tried to keep the price down by basing its design on successful existing ships rather than starting from scratch.
Babcock's "Team 31" design is derived from the Iver Huitfeldt frigates developed for the Danish navy.
Plenty of flexibility has been factored in - equipment can be upgraded or reconfigured for different roles .
The ship is sometimes referred to as the Type 31e - the "e" standing for exportability.
The hope is that this "bargain basement ship" will prove its worth and orders from foreign navies will lead to economies of scale that will drive down costs.
Such value for money, some argue, might even tempt the Royal Navy to bolster its surface fleet by increasing the order.
The last big frigate order - for the Type 26 - was announced in the summer of 2014, just months before the Scottish independence referendum, with the work going to the BAE Systems yards in Glasgow.
While the government insisted this was a value-for-money decision, many pro-union campaigners argued it demonstrated the benefits of being part of the UK.
The 2015 Strategic Defence and Security Review scaled back the expected size of the Type 26 fleet from 13 to eight ships - and instead proposed building "at least five" new general purpose frigates, at a much lower cost.
With no guarantee this work would come to Scotland, pro-independence campaigners condemned this as a broken promise.
In 2017, the government's new National Shipbuilding Strategy, based on Sir John Parker's independent review, sought to encourage competition in naval procurement, with an emphasis on supporting shipyards across the UK.
The choice of Babcock - with its Rosyth site playing a key role in construction but with work spread across various UK sites - is in line with this strategy.
It also reduces the government's reliance on BAE Systems, which has long been the dominant force in naval shipbuilding.
The rival BAE Systems bid would have seen the company providing design expertise but the bulk of construction would have taken place at the Cammell Laird shipyard in Merseyside.
'Steadying the drumbeat'
Analysis by Douglas Fraser, Business and Economy Editor, BBC Scotland
In shipbuilding, they talk a lot about the need for a drumbeat, describing the rhythm of production of ships, to keep the workforce busy and efficient, like you'll find on a factory production line.
The industry here has had an irregular drumbeat, partly because of lumpy government orders. And British shipbuilding has not been competitive in export markets.
Instead, the larger yards, such as the two on the upper Clyde, have thrived only in the protected market of building warships for the Royal Navy.
The Type 31e decision means there should be a steadier drumbeat of work. It's already on the Clyde, with the Type 26 frigate programme running until 2030.
Soon, the Forth should have its own drumbeat at Rosyth.
That's nearly a decade of work on both sides of Scotland. It's an opportunity to build in more efficiency, helped by an extra £50m Babcock investment in Rosyth facilities.
What's much less clear than expected is what this means for Ferguson shipyard in Port Glasgow. It was part of the "Babcock Team 31", but at Rosyth, there's no talk of teams or consortiums now.
Babcock is the preferred bidder (that is, the only one now in negotiations with the government). It has the capacity for all the work to be done at Rosyth, or it can choose how and where it sub-contracts.
That is subject, however, to a lot of political pressure - if not instruction - as to how the contract should be shared around the UK, to fit with the government's shipbuilding strategy.
So Ferguson has to fight with others for a share of the work, even including Cammell Laird on Merseyside with BAE Systems, which formed the losing bid.
Another uncertainty that has to be built into this announcement stems from the dismal track record of Ministry of Defence estimates of timing and budget for its procurement. This one looks particularly ambitious in driving costs down.