BERLIN — Shortly after the earthquake and tsunami struck the Fukushima Daiichi nuclear plant in Japan in March, stores in faraway Germany began selling out of radiation-tracking Geiger counters. Sales of iodine pills to limit the absorption of radiation surged briskly, too, propelled by anxiety that people might find themselves engulfed in clouds of long-range radioactive fallout.

No matter that the incipient nuclear catastrophe was about 5,500 miles away, or that Germany, unlike Japan, did not lie on known tectonic fault lines. On the streets of major cities, hundreds of thousands of protesters, casting events in Japan as a portent of what might happen here, turned out ahead of state elections to demand a halt to Germany’s own nuclear power program, the source of nearly a quarter of the nation’s electricity.

Those two intertwined phenomena — angst and electoral maneuvering — led to what seemed one of the most abrupt reversals of Angela Merkel’s years as German chancellor: On Monday, she abandoned plans laid only nine months earlier to extend the life of the country’s nuclear power stations and ordered instead that they be phased out by 2022.

The decision meant that, at Europe’s heart, the Continent’s economic powerhouse had committed itself far more radically than its neighbors to the east or west to replace nuclear power with renewable sources of energy like wind turbines — or at least, critics said, with nuclear-generated power imported from neighbors like France.