Total SA will invest about 15 million euros ($17 million) to build France’s biggest battery, helping the country guard against blackouts when power demand peaks.  The oil and gas company, which bought French battery maker Saft in 2016, will install an energy-storage site with a 25 megawatt-hour capacity in the port district of Dunkirk, it said Thursday. The project is part of France’s plans to ensure energy security as it shuts down coal-fired power stations and starts to retire aging nuclear plants to make room for renewables.

Stationary energy storage is “critical to the expansion of renewable energy, which is intermittent by nature,” Total Chief Executive Officer Patrick Pouyanne said in a statement. The project “will contribute toward the goal of increasing the share of renewables in France’s energy mix, while helping to stabilize the domestic power grid.”

France’s so-called capacity mechanism, introduced to boost the security of electricity supply, obliges suppliers to guarantee capacity matching customers’ consumption during peak periods.