Nissan is closing its factory in Barcelona with the loss of about 2,800 jobs, according to the Spanish government.
The move is part of a worldwide restructuring being unveiled by the Japanese carmaker.
The closure could cost Nissan, which has a major UK plant in Sunderland, up to €1bn (£898m), the government said.
Car sales have been hit by the virus pandemic, while manufacturers are investing heavily in electric vehicles.
Nissan is part of a three-way alliance with Renault and Mitsubishi, which are restructuring global operations to enable them to work more closely.
Even before the Covid-19 outbreak, Nissan’s sales and profits had been falling, forcing it to pull back from the ambitious expansion plan of its now ousted leader Carlos Ghosn.
The carmaker’s operating profit had tumbled for four years in a row as it chased market share, particularly in America, leading led to overcapacity at its car plants and steep discounts.
In April, Nissan said that it expected to post an annual operating loss of up to 45bn Yen (£340m).
The pandemic has added yet more pressure on the company to step up its cost-cutting efforts.