Ford's engine plant in Bridgend is set to close in autumn 2020, with the loss of 1,700 jobs.
Union officials were told of the plans at a meeting with Ford bosses which include the offer of redeployment.
Workers were sent home after receiving a letter which said they will lose their jobs in phases by 25 September next year.
Ford blamed "changing customer demand and cost" for the closure plans and denied Brexit was a factor.
In a statement, Ford of Europe president Stuart Rowley said creating a sustainable business required the company to make "difficult decisions", including the need to make its engine manufacturing base suitable for the vehicles it produces in the future.
"We are committed to the UK. However, changing customer demand and cost disadvantages, plus an absence of additional engine models for Bridgend going forward make the plant economically unsustainable in the years ahead."
Later, he said the decision was nothing to do with Brexit although he realised the company's plans would be "very significant for the employees, their families and the community in south Wales".
Mr Rowley has confirmed the company will repay £11m in incentives offered by the Welsh Government.
Economy minister Ken Skates said he was "absolutely livid" at Ford's decision to "turn their back on Bridgend".
"We pumped a huge amount of money into this facility and we expected more from Ford."
He told Gareth Lewis on BBC Radio Wales that he was working with the chemicals company Ineos and others "who would like to come to this area".
He added the site is "a priority" for any inward investment.
Workers at the plant said they were devastated.
"I'm expecting to lose my job," said Tony Phillips, who has been at the plant for 31 years, adding that they were "good, well-paid jobs".
Fellow worker Mark Lendrum said: "South Wales is going to be like a ghost town."
Leader of Bridgend council Huw David, said there is "not a family in Bridgend that won't be affected by this" and it is a "fabulous workforce" from Newport to Llanelli.
"We don't know how we are going to recover from this.
"Both governments want to keep the jobs here. We as the council will help people to find other work," he said.
'End is nigh'
Graham Rees has worked at Ford in Bridgend for 35 years.
"You see work come and go, when an engine dies off, there's a replacement, but this time, what do you do?
"It doesn't matter what you're building, if people don't want to buy it, it's at the end at its life, full stop," he said.
"You get a feeling that yes, the end is nigh, but nobody wants to admit that, so you prepare yourself and get on with it.
"There is no light at the end of the tunnel, you've just got to face the truth."
The closure news comes just months after Ford said it was cutting its Welsh workforce by 1,000, with 370 going in a first phase.
Investment in a new petrol engine, called Dragon, was scaled back, while production of an engine for Jaguar Land Rover is due to end this year.
Just days ago, it was revealed that car sales in the UK had fallen again.
GMB regional organiser Jeff Beck said: "We're hugely shocked by today's announcement. It's a real hammer blow for the Welsh economy and the community in Bridgend."
He said the union would continue to work with Ford, other unions and the Welsh Government "to find a solution to the issue and mitigate the effects of this devastating news".
Unite union general secretary Len McCluskey said Ford had treated its UK workers "abysmally".
"The fact remains that it is cheaper, easier and quicker to sack our workers than those in our competitor countries," he said, vowing to "resist this closure with all our might".
How Ford came to Bridgend
Ford chose Bridgend for its new engine plant in the summer of 1977 after competition from elsewhere in Europe, chiefly from Ireland.
The company needed an engine for its new model - code-named Erika - which became the next generation Ford Escort.
It was to be built at Halewood on Merseyside and at Saarlouis in Germany from 1980.
The promise had been for 2,500 jobs but by the time it opened in May 1980, Ford had decided to take on only 1,400 workers. There were 22,000 people applying for the roles.
Concerns about the plant's long term future were raised more than a decade ago when the decision was taken to no longer have Ford UK and Ford Europe making different designs of cars compared with the USA and rest of the world.
Welsh Secretary Alun Cairns said he knew it was an "extremely worrying and uncertain time for Ford workers, their families in Bridgend and the surrounding communities".
"The UK government will work closely with Ford, the trade unions and the Welsh Government, to make sure this highly-valued workforce can move into new skilled employment."
Earlier, Mr Cairns told BBC Wales he had been in touch with Ken Skates about exploring the production of electric vehicles as a means of protecting jobs in the Bridgend area.
Mr Cairns said the UK government and Welsh Government "have already been working on potential investors" but "clearly there is a lot more work".
He added that "the Brexit issue doesn't stand up" in being a part of Ford's decision.
But Bridgend Labour MP Madeleine Moon said she believed it was "very clearly about Brexit".
"The knock-on effect to the south Wales economy is huge - there are 12,000 associated jobs.
"The map has just been rubbed out," she said.
Mr Skates said the Welsh Government would provide a "rapid response taskforce to support workers".
Since 1978 about £140m in taxpayers' money has been invested in the plant, Mr Skates said.
That had been "money well spent" since the plant had "pumped back" £3bn into the Bridgend economy over the last 10 years alone, Mr Skates said.
"What we have repeatedly said to Ford over recent months and years is that Wales stands ready, it is perfectly situated and positioned to help businesses."
First Minister Mark Drakeford said the news was "incredibly sad", and pledged the Welsh Government would do "everything in its power" to support those affected and to "work with all partners to explore options for the future of the plant".
Plaid Cymru leader Adam Price said closure would be "one of the most bitter blows" to the Welsh economy for more than 30 years.
"The implications of this in terms of the supply chain in terms of job losses is very, very grave indeed," he added.
£3.3bnvalue to Welsh economy over 10 years
£140mWelsh Government support
£45,000average annual salary
Timeline to closure
2008: Ford announces it will operate as a single global company - meaning its Bridgend engine plant had to compete with the firm's other factories across the world, not just in Europe
2015: Bridgend secures investment for Dragon petrol engine project - with 250,000 engines a year, although it has capacity for 750,000 a year
2016: The planned Dragon investment is reduced to £121m and the number of engines is cut in half to 125,000
2017: Ford projects a reduction of 1,160 workers by 2021 and confirms production of Jaguar Land Rover engines - which involves half the workforce - will end in 2020
2018: Workers making Jaguar engines face a five-day shutdown as a knock-on effect from JLR's temporary production halt. Ford's European boss warns a no-deal Brexit would be "pretty disastrous"
Jan 2019: Ford plans to cut 370 jobs the first phase of redundancies which will total 990 by 2021. The Dragon project was scheduled to employ about 500
June 2019: Ford announces it plans to close the plant in September 2020 citing three reasons - the phasing out of one engine model, the end of Jaguar Landrover contract and a decline in the demand for the new 3-cylinder engine
What's happening to the car industry?
Several car firms with UK factories, including Honda, Jaguar Land Rover and Nissan, have announced significant cuts. This is down to a combination of different reasons.
The car industry troubles have been blamed in part, "because the trade future is uncertain with Brexit," according to consultant Anna-Marie Baisden.
But the head of autos research for Fitch Solutions added there had also been a "shift away from what is being made at the moment, in terms of diesel cars".
Karel Williams, an automotive expert from Manchester Business School said the plant closure is "collateral damage" from other "larger developments" such as the push towards electric engines.
He also said it highlighted the limits of the Welsh Government's "inward investment strategy".
Analysis by James Williams, BBC Wales Brexit correspondent
It's the Brexit equivalent of a Rorschach test - you can interpret the inkblot or decision in different ways.
Those who want to see us stay in the EU see Brexit as a factor in Ford Bridgend's closure, whilst Brexiteers point the finger of blame at the wider pressures bearing down on the automotive industry - from a shift to electric cars to falling demand from China.
Ford announced back in December that it was restructuring its operations right across Europe.
As part of that change, a plant in Bordeaux in France is to be closed and thousands of jobs cut in Germany. Brexit, obviously, was not a factor in those decisions.
Given that context, here in Wales and the UK, the additional issue of Brexit and the ongoing uncertainty over what kind of economic relationship we'll have with EU's single market doesn't help matters.
Nissan, when it announced its decision to move production from Sunderland to Japan, said Brexit uncertainty is not helping them "plan for the future" whilst Honda said that its plant closure in Swindon wasn't related to our departure from the EU.