The government, which had said in January after a meeting with leaders from Renault and Nissan that jobs at the Barcelona plant were "guaranteed," urged the Japanese carmaker to look at other options for the Barcelona plant.
A Nissan Spain spokesman and a union leader did not immediately respond to a request for comment.
The closure would cost Nissan as much as 1 billion euros ($1.1 billion), the government said in a statement, arguing that investing in the factory would be a cheaper alternative for the Japanese giant, which is set to unveil a global survival plan later on Thursday.
Carmaking alliance partners Nissan, Renault and Mitsubishi Motors said on Wednesday they were reorganising their global production to save costs and become more efficient, raising fears that Nissan's Barcelona factory would shut.
Renault, which will now take the lead for the alliance in Europe, has two factories in Spain.
"We obviously regret this decision," Economy Minister Nadio Calvino told broadcaster TVE, saying the government would continue to work with Nissan and local and regional authorities "to see how to proceed and maybe look for an alternative solution".
Nissan's main plant in Barcelona employs about 2,400 workers with another 600 workers in several related facilities. It's Nissan's main plant in Europe after one in Britain.
The closure could indirectly affect up to 25,000 jobs, unions have said.
Nissan workers have been staging protests since early May after the company only partially resumed its production following what was then a temporary shutdown because of the coronavirus pandemic.
Unions have said they plan to form a human chain around Nissan's main Barcelona plant later on Thursday.
The Barcelona plant, which mainly produces an electric van and a pick-up truck, has been operating at well under its maximum capacity, leading to protests from workers, who have complained of a lack of a clear roadmap and been on strike since early May.
This story has been published from a wire agency feed without modifications to the text. Only the headline has been changed.