BAE Systems is to cut 1,775 jobs at its yards in Scotland and England and end shipbuilding altogether at Portsmouth.
The firm said 940 staff posts and 170 agency workers will go at the Portsmouth site, which will retain repairs and maintenance work.
Some 835 jobs will be lost at yards in Govan and Scotstoun on the River Clyde in Glasgow, Rosyth in Fife and Filton, South Gloucestershire, near Bristol.
The cuts follow a drop in work after the end of aircraft carriers work.
BAE Systems said it had made the cuts because of a “significant” drop in demand.
The defence contractor and the Ministry of Defence (MoD) have together announced measures which they hope will offset the effect of the job cuts.
Among the plans are more than £100m of investment to expand the dockyard at Portsmouth.
Three new ocean-going Offshore Patrol Vessels for the Royal Navy will also be built at BAE's Govan and Scotstoun yards in Glasgow.
This will help sustain shipbuilding at the yards until work begins on the Type 26 Global Combat ships.
BAE, which heads a consortium that includes Babcock and Thales UK, said it had agreed changes to the Queen Elizabeth-class aircraft carrier contract it signed with the MoD in 2009.
This would see the consortium's fee move to a 50-50 risk share arrangement which would provide greater cost performance incentives.
A statement released by BAE Systems said: “Under these proposals, shipbuilding operations at Portsmouth will cease in the second half of 2014.
“Subject to consultation, Lower Block 05 and Upper Blocks 07 and 14 of the second Queen Elizabeth Class Aircraft Carrier will be allocated to Glasgow.
“The company remains committed to continued investment in the Portsmouth area as the centre of its Maritime Services and high-end naval equipment and combat systems business.”
BAE said it had agreed with the MoD “that Glasgow would be the most effective location for the manufacture of the future Type 26 ships”.
“The company proposes to consolidate its shipbuilding operations in Glasgow with investments in facilities to create a world-class capability, positioning it to deliver an affordable Type 26 programme for the Royal Navy,” BAE said.
It said the cost of this restructuring would be borne by the MoD.
BAE said it would now begin consultation to cut 1,775 jobs “to result from these restructuring proposals”.
This would see 940 posts go in Portsmouth in 2014 and 835 across Filton, Glasgow and Rosyth, through to 2016.
The statement added: “The cost of the restructuring will be borne by the Ministry of Defence.
“The implementation of these restructuring activities will sustain BAE Systems' capability to deliver complex warships for the Royal Navy and secure the employment of thousands of highly skilled employees across the UK.”
The MoD confirmed that it would commission three new ocean-going Offshore Patrol Vessels to play “a key role in counter-terrorism, counter-piracy and anti smuggling operations”.
These will be built , it said, at BAE's Govan and Scotstoun yards in Glasgow.
Work on the new vessels is due to begin next year with the first ship being delivered to the Royal Navy in 2017.
The ships are expected to replace the current, smaller River Class vessels which have been policing the UK's waters since 2003.
Defence Secretary Philip Hammond said: “This deal will provide the Royal Navy with three brand new maritime patrol vessels with a wide range of capabilities which will support our national interests and those of our overseas territories.
“This is an investment not only in three ships but in this country's warship building industry. It prevents workers standing idle and sustains the vital skills needed to build the planned Type 26 frigate in the future.
Mr Hammond is also announcing that more than £100m will be invested in Portsmouth.
The money will be used to expand the dockyard to ensure it is ready for the arrival of HMS Queen Elizabeth and HMS Prince of Wales as well as the Type 45 destroyers which are based in Portsmouth.
The defence secretary added: “I am also pleased to announce additional investment in Portsmouth Naval Base to prepare for the significant increase in tonnage as the home port for the Royal Navy's aircraft carriers and destroyers.”
The Mod said under the terms of the new arrangements that “Portsmouth will maintain its proud maritime heritage as the home of much of the Royal Navy's surface fleet and the centre of BAE Systems ship support and maintenance business”.
Speaking at Prime Minister's questions in the Commons, David Cameron said his thoughts were with the workers affected by these “extremely difficult decisions”.
He added: “We want our Royal Navy to have the best and most modern ships and the best technology.
“That means we will go on building warships on the Clyde, we will be announcing three new offshore patrol vessels, keeping that yard busy rather than paying for it to remain idle as the last government proposed.
“In Portsmouth, yes there will be job reductions, but there are many more people involved in ship servicing than in ship building, so the workforce will go from 12,000 to 11,000.”
The SNP's Westminster leader Angus Robertson said: “Today is a very sad day for many families in Glasgow, and I'm sure the thoughts of everybody on all sides of the House is with them.”
David Hulse, GMB national officer and chair of the Confederation of Shipbuilding and Engineering Unions' shipbuilding national committee, said the announcements had been part of a “devastating day for the UK shipbuilding industry”.
“We have arranged a two-day meeting with the company at Farnborough next Monday and Tuesday that will be attended by officers and shop stewards from all the yards and all the unions,” he said.
“This meeting will examine in detail the business case and all aspects for scheduling work in the yards to complete building the carriers, starting work on the Type 26 ships and any other work.”
The independent MP for Portsmouth South, Mike Hancock, said ending shipbuilding at Portsmouth would be a difficult decision to reverse.
He added: “The expertise is very, very much dedicated to shipbuilding. And once they disperse the workforce in various parts of the south of England I don't think it's going to be easy to put that back together.
“I think the government are making a big mistake for the future of ship building in the UK, particularly military shipbuilding.”
BBC Scotland understands that workers at BAE's Scotstoun and Govan yards in Glasgow have been sent home for the day.
They were told by management there would be about 800 jobs lost in Scotland but no breakdown was given.
Workers who left the yard said they were worried and disappointed, but that the announcement was not unexpected.