BRUSSELS — Germany on Tuesday became the first European country to shut nuclear plants in the wake of the crisis in Japan as the European Union made plans to test all 143 nuclear power plants in its 27 countries.

Chancellor Angela Merkel of Germany said seven plants that went online before 1980 would be temporarily closed and the time would be used to study speedier adoption of renewable energy. All of the plants were built by German contractors.

While Mrs. Merkel asserted that safety was her main concern, opposition politicians accused her of pandering to fear about nuclear power ahead of a regional election this month. She has, in effect, suspended a decision last autumn to keep older plants operating beyond their previously designated life span.

The tests across the European Union are intended to ensure preparedness for emergencies like floods and tsunamis, as well as terrorist attacks, the European energy commissioner, Günther Oettinger, said after meeting with representatives of the nuclear industry, electricity companies and governments.