Germany, the economic engine of Europe, said Monday that it will close all of its nuclear power plants over the next 11 years, the latest aftershock from the Japanese earthquake and partial meltdown it set in motion at the Fukushima Daiichi nuclear complex.

The move is an about-face for German Chancellor Angela Merkel, whose government until recently had supported nuclear power as a way to generate electricity without releasing additional greenhouse gases — and without increasing reliance on Russia, Germany’s main source of natural gas.

It also marks a new setback for nuclear power proponents, who have been on the defensive since four of the reactors at Fukushima Daiichi started leaking radioactive materials in mid-March.

Earlier, Merkel’s party, the Christian Democratic Union, had advocated the extension of operating licenses for the country’s 17 nuclear power plants by an average of 12 years, saying that nuclear power is needed as an important “bridging technology” while renewables make further advances.

But in the wake of the Fukushima crisis, Merkel announced the temporary closure of seven of the nuclear plants. Now, after another wave of anti-nuclear-power demonstrations, Merkel said that those plants would remain closed, that there would be no extensions and that all remaining plants would be shut down by 2022.

“Our energy system has to be changed profoundly,” she said. “It must be safer, more reliable and economically viable.”

“We believe that we can show those countries who decide to abandon nuclear power — or not to start using it — how it is possible to achieve growth, creating jobs and economic prosperity while shifting the energy supply toward renewable energies,” she said.

Delivering on that pledge will be a tall order. Germany gets nearly a quarter of its electricity from nuclear power. With an aggressive program of subsidies, renewable energy’s share has climbed to 17 percent.

Now the German government hopes to double that share to make up for the loss of nuclear power — but that will require advances in power storage and management because nuclear power runs constantly; wind and solar run intermittently. The German government also said it would try to cut energy use by 10 percent.

Supporters of nuclear power said Merkel’s about-face shows weakness and a desperate effort to gain support as her popularity ebbs. She has supported, among other things, a rescue package for the faltering Greek economy, a plan that is not popular in Germany but one that Merkel has called important for the stability of the euro zone.

There has long been a powerful strain of nuclear skepticism in Germany, and the Green Party — which was founded to combat nuclear power just as the Three Mile Island disaster struck the United States — was poised to benefit from a new nuclear scare in March, just days before winning a regional election.

The closing of the nuclear power plants will deal a blow to the German energy conglomerate RWE, whose chief executive Juergen Grossmann said in April that such a move would hurt RWE’s earnings and curtail its capital investment plans.

“The fact of the matter is that in the short term, without nuclear energy, one cannot ensure a supply of energy that is gentle on the environment and provides security of supply at affordable prices without jeopardising Germany as an industrial nation,” Grossmann said in a letter to shareholders this month. He called the transformation of the energy sector sought by the country’s politicians “a Herculean task.”

Four power companies said last week in the Sueddeutsche Zeitung newspaper that Germany could face blackouts during the cold months if it eliminated nuclear power, as solar power diminishes during the long, gray winters and winds that spin turbines slacken.

If that proves to be the case, Germany would have to turn to its own coal reserves, to Russia for additional natural gas supplies or to France, which exports electricity from its own nuclear power plants, which also supply 80 percent of France’s electricity.

But European nations have been seeking to reduce their reliance on coal as well as Russian gas. And France already exports some surplus electricity to Italy. European leaders said Monday that the German nuclear power plant closures could raise electricity prices on the continent.

Merkel, a physicist by training, said the details of how Germany would fill possible near-term gaps in supply would come later. She said the country would stick to its targets for slashing carbon emissions, suggesting that coal would not be the answer.

French Prime Minister Francois Fillon said that “there’s no way” for the European Union to meet its emission-cutting targets without at least some nuclear power.

Switzerland, which gets 40 percent of its electricity from nuclear power, also announced last week that it plans to shut down its reactors once they reach their expected life span of 50 years. The last plant would come off the grid in 2034.

Berlin correspondent Michael Birnbaum contributed to this article.