Germany famously decided to stop using atomic energy in 2011, and the last remaining plants were set to close at the end of this year.
However, an increasing number of politicians have been arguing for the postponement of the closures amid energy concerns arising from Russia's invasion of Ukraine. The issue divides members of Scholz's ruling traffic-light coalition.
What did the chancellor say?
Visiting a factory in western Germany, where a vital gas turbine is being stored, Chancellor Olaf Scholz was responding to a question about extending the lifetime of the power stations.
He said the nuclear power plants in question were only relevant for a small proportion of electricity production. "Nevertheless, that can make sense," he said.
The German government has previously said that renewable energy alternatives are the key to solving the country's energy problems.
However, Scholz said this was not happening quickly enough in some parts of Germany, such as Bavaria.
"The expansion of power line capacities, of the transmission grid in the south, has not progressed as quickly as was planned," the chancellor said.
"We will act for the whole of Germany, we will support all regions of Germany in the best possible way so that the energy supply for all citizens and all companies can be guaranteed as best as possible."
The phaseout has been planned for a long time. Germany's Social Democrat government, under Merkel's predecessor Gerhard Schröder, had announced that Germany would stop using nuclear power by 2022.
Schröder's successor Angela Merkel — herself a former physicist — had initially sought to extend to life of existing nuclear plants to as late as 2037. She viewed nuclear power as a "bridging technology" to sustain the country until new alternatives could be found.
However, Merkel decided to ditch atomic energy in 2011, after the Fukushima nuclear disaster in Japan.
Nuclear power accounted for 13.3% of German electricity supply in 2021. This was generated by six power plants, of which three were switched off at the end of 2021. The remaining three — Emsland, Isar and Neckarwestheim — were due to cease operation at the end of 2022.
Germany's energy mix 1st half of 2022
The need to fill an energy gap has emerged after Russia dramatically reduced gas deliveries to Germany through the Nord Stream 1 pipeline. Officials in Berlin say the Kremlin is seeking to punish the country — which is heavily reliant on Moscow's gas — for its support of Ukraine and sanctions on Russia.
Germany has already said it will temporarily fire up mothballed coal and oil power plants in a bid to solve the looming power crisis.
Social Democrat Scholz and Germany's energy minister, Robert Habeck, from the Green Party, a junior partner in the three-way coalition government, had previously ruled out any postponement of the nuclear phasout. The third member of Scholz's coalition, the neoliberal Free Democrats, has voiced support for the extension, as has the opposition conservative CDU-CSU bloc.
Berlin has said it will await the outcome of a new "stress test" of Germany's electric grid before deciding on the phaseout.