Germany's government plans to keep two of the country's three remaining nuclear power plants running until mid-April to help prevent a potential winter energy shortage, the economy and energy minister said Tuesday.

The announcement by Economy and Energy Minister Robert Habeck means the government has officially, albeit temporarily, reversed Germany’s long-held plan to shut shut down its nuclear plants by the end of the year.

Habeck said the decision to keep operating the two plants in southern Germany — Isar 2 in Bavaria and Neckarwestheim north of Stuttgart — into next year a "necessary" step to avoid potential power grid shortages in the region.

EUROPEAN GOVERNMENTS, CITIZENS GEAR UP FOR WORSENING ENERGY CRISIS

Habeck’s party, the Greens, long opposed nuclear power. In recent months, however, he acknowledged that several factors could come together to severely strain Europe's energy supplies this winter.

Germany’s opposition parties have called for the country’s nuclear plants to be kept online, with some lawmakers suggesting that already shuttered ones should be reopened and new reactors built.

Some members of a small pro-business party that’s part of the governing coalition, along with Habeck’s environmentalist Greens and Chancellor Olaf Scholz’s center-left Social Democrats, have argued in favor of running all three remaining reactors for as long as possible.

German nuclear power plant

The Neckarwestheim nuclear power plant, pictured here in Neckarwestheim, Germany on Sept. 12, 2022, is one of the two nuclear power plants Germany will keep operational to provide energy during a possible energy crisis in the country. (Photo by Thomas Niedermueller/Getty Images)

Earlier this month, officials had said Germany would stick to its plan of shutting down the remaining nuclear plants this year but keep the option of reactivating two of them as a "reserve" in case of an energy shortage.

Officials still plan to close down Germany's third remaining nuclear plant, Emsland in the northern German state of Lower Saxony, at the end of the year as planned.

Habeck said officials announced the decision Tuesday in light of stress test data from France's nuclear providers that indicated grid shortages could be more severe than expected this winter.

PROTEST BREAKS OUT IN BELGIUM OVER SKYROCKETING ENERGY COSTS

"The situation in France is not good and has developed much worse than was actually forecasted in the last few weeks," he said. "As the minister responsible for energy security I have to say: Unless this development is reversed, we will leave Isar 2 and Neckarwestheim on the grid in the first quarter of 2023."

Like other European countries, Germany is scrambling to ensure the lights stay on and homes stay warm this winter despite the reduction in natural gas flows from Russia amid the war in Ukraine.

The government previously announced numerous measures to make up for the reduction, including the import of liquefied natural gas from other suppliers, while urging citizens to conserve as much energy as possible.