“We would have been overjoyed to get 20 percent,” Mr. Cunitz said.

In fact, the Greens won 28 percent in Germany’s button-downed financial center. The vote was one of numerous dramatic gains by the Greens in recent state and local elections as citizens responded to the Japanese nuclear disaster by choosing the party with a long record of opposition to nuclear power.

But the Greens’ newfound clout also raises the question of whether a onetime protest party can lead a manufacturing economy into a new age of renewable energy.

The most severe test will come in the state of Baden-Württemberg, where the Greens won enough votes to lead a state government for the first time. The Greens’ next goal is to take power in Berlin, which has the status of a state.