French oil company Total S.A. has announced changes to its oil refinery operations in response to the decline in demand for petroleum products in Europe.

The company said on Thursday that it will convert one facility to renewable diesel production and upgrade another to produce low-sulfur fuels.

The decision comes after Total took a close look at the business to consider the future of its five refineries in France. Three of the plants — Gonfreville in Normandy, Grandpuits in the Paris region and Feyzin near Lyon — were considered able to withstand the deteriorating economic environment in 2013 and 2014 and generate ongoing income streams. The other two, Donges and La Mëde, were running at a loss.

In order to improve the performance of both refineries and secure their long-term future, Total has drawn up a comprehensive plan to change the way they operate.

The company will invest of EUR200 million ($215 million) to transform the La Mëde refinery into France's first biorefinery to meet growing demand for biofuels. The plant will cease crude oil processing at the end of 2016 and will start hydrotreating used cooking oils and other feedstock into renewable diesel.

At the Donges refinery, Total will invest EUR400 million ($430 million) to switch to production of low-sulfur fuels that meet new European Union specifications.

"There are three possible responses to the crisis in the European refining industry. The first is to throw in the towel. The second is to do nothing and perish. The third is to innovate and adapt to meet shifting demand trends," commented Total CEO Patrick Pouyannè. "The central focus of Total's plan for our French refining business is to realign our operations and products to changing markets."

Pouyannè believes that these changes will give the two loss-making refineries a future while strengthening Total's refining base in France.