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, and Rosyth in Fife and at the firm's Filton office, near Bristol.
The cuts follow a drop in work after the end of aircraft carriers work.
BAE Systems employs 1,200 in Portsmouth and 3,200 across Govan, Scotstoun, Rosyth and Filton.
The company 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 could help sustain shipbuilding at the yards until work is due to begin 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 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."
Labour's Shadow Defence Secretary Vernon Coaker said it was "a difficult day" for the shipbuilding industry and his first thoughts were with those facing job losses.
He added: "Two things are clear. Firstly, the MoD is to meet the cost of restructuring the naval shipbuilding business across Britain. We need to see all of the detail about how much that will cost and how the cost will be met.
"Secondly, Britain must retain a sovereign shipbuilding capability. None of us want to see Scotland leave the United Kingdom, but we need clarity from the government about what safeguards are in place to meet all eventualities after next year's referendum."
Scotland's Deputy First Minister Nicola Sturgeon told the BBC she was relieved Govan was not closing, but said the 800 job losses were a "devastating blow" for the Clyde and Scottish economy.
"The Scottish government will be working very closely with the company and with the trade unions, firstly to minimise the number of job losses, but also to work very hard with those affected to help them into alternative employment," she said.
Ms Sturgeon the Clyde yards would be the best place to build the new Type 26 ships.
She said: "The investment that we've seen in the Clyde yards in recent years, the skill mix of the workers in the Clyde, make the Clyde the best place to build these ships - there's no doubt about that."
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."
Workers at BAE's Scotstoun and Govan yards in Glasgow were sent home for the day after being told the news.
They were told by management there would be about 800 jobs lost in Scotland but no breakdown was given.
Workers who left the yards said they were worried and disappointed, but that the announcement was not unexpected.
Alex Taylor, 63, a plater at Govan, said: "We've known for a while that the workload isn't there to carry the amount of people that we had building the carriers, but hopefully voluntary redundancies will take up the slack."
He added that those affected by the job cuts at Portsmouth were "working class guys the same as ourselves, they're just shipbuilders.
"We're obviously relieved that things are looking better for the Clyde, but that doesn't mean to say that we've not got feelings for our comrades in Portsmouth."