In a statement released on Thursday, Nissan’s Spanish arm has announced the cut of 600 jobs, or nearly 20 percent of the local workforce, at its facility located in Barcelona.

The decision has been taken after more than a month of negotiations with unions and the agreement combines buyouts with early retirements. The process will begin on June 13 and continue throughout the fiscal year, which ends in March 2020.

The settlement was a necessity for Nissan to continue making cars in in the Spanish factory. Talking about it, the plant’s managing director, Genis Alonso, said: “The agreement allows us to take advantage of the future opportunity offered by the multinational to continue manufacturing cars in Barcelona.”

It’s not all bad news, as the Japanese automaker will invest a further €70 million ($78 million) in a new state-of-the-art paint plant.

Nissan has five production centers in Spain, located in Barcelona, Avila and Cantabria, which employ a total of 5,000 workers.

In Barcelona, the company makes its one-ton pickup truck, the Navara, along with its French and German cousins, the Renault Alaskan and Mercedes-Benz X-Class, as reported by AutoNews. Additionally, the plant also puts together the NV200 and electric e-NV200 light commercial vehicles and used to assemble the Pulsar, too.

The compact hatchback used to rival the likes of the Volkswagen Golf & Co., until last year, when it was retired from Europe. The Pulsar is still being made in China’s Guangzhou and Russia’s Izhevsk factories.