The Green party has taken power from Angela Merkel's conservatives in one of Germany's richest states, preliminary results from the Baden-Württemberg elections show.

The chancellor's Christian Democratic Union party, or CDU, had ruled the region's state legislature for almost 58 years, but found itself on the wrong side of the nuclear debate following Fukushima. Even before the Japanese earthquake, the party was unpopular locally for sanctioning a multibillion euro project to build a railway station in Stuttgart.

Support for the CDU slumped from 44.2% in the 2006 state election to 39%, according to official results.

The state parliament's new leader would be Winfried Kretschmann, 62, a spiky-haired former science teacher. He is likely to become the Green party's first regional "minister president" after his party gained 25% of the vote; enough, when combined with the 23.1% for the centre-left Social Democratic party, to form a coalition. Minister presidents are powerful on a national as well as a regional level, because they have a vote in Germany's upper house, the Bundesrat, and can veto legislation.

It would mark a historic win for the minority party, which polled 11.7% in Baden-Württemberg in 2006. Even when the Greens were in government in a coalition with Gerhard Schröder's Social Democrats between 1998 and 2005, and had Joschka Fischer as foreign minister, the party never managed to win a regional "Landtag" election.

"We have written history," said Claudia Roth, joint leader of the Green party, speaking in Berlin after polls closed. Dressed head-to-toe in green, including glittery emerald ballet pumps, she said the result would have repercussions far beyond the borders of Baden-Württemberg. It was, she said, "a resounding slap in the face" for Merkel's coalition.

Commentators have suggested that a dramatic CDU defeat makes Merkel's position untenable. It would be "the beginning of the end" for her, wrote one on Spiegel Online on Friday. Others suggest the leader known as Iron Angie will plough on until the general election in 2013.

Also voting on Sunday was Rhineland-Palatinate state, where an ARD exit poll saw the Social Democrats retain power but only by agreeing to a coalition government with the Greens. The SPD fell 10 percentage points to 35.5%, while the Greens appeared to have more than trebled their vote, with 17%, according to the exit poll, and will send representatives to that regional parliament for the first time. The Christian Democrats are seen gaining 1.2% to 34%.

But this did little to numb the pain in Baden-Württemberg; though the CDU did win more votes than any other single party, its preferred coalition partner, the pro-business Free Democratic party, performed abysmally. The FDP were at 5.3%, down from 10.7% in 2006. In Rheinland-Pfalz, the FDP failed to get the 5% minimum necessary to gain any seats in the state parliament.

This poor showing poses difficult questions for the FDP's leader, the unpopular foreign minister Guido Westerwelle. It could also call into question the national CDU-FDP coalition in power since autumn 2009. Within half an hour of the first exit poll, Daniel Bahr, an FDP politician from Nordrhein-Westfalen, told ARD his party needed to consider a "change of personnel".

The Green vote was helped by the argument in Germany over its 17 nuclear power plants, heightened by the Fukushima disaster. In the aftermath, Merkel performed an 180-degree policy change by announcing the closure of seven stations built before 1980. She also said she was committed to speeding up total withdrawal from nuclear power.

This was six months after she had ignored public opinion by extending the life of the 17 plants by an average 12 years; in this, one of her most vociferous supporters was Baden-Württemberg's minister president, Stefan Mappus; he paid the price for his loyalty.