Germany's conservative CDU party was on track to win a regional election in North Rhine-Westphalia on Sunday, but the Green party could emerge as "kingmaker" in a potential coalition with Chancellor Olaf Scholz's Social Democrats and the FDP.
An exit poll by infratest dimap, published by broadcaster ARD, had the CDU taking 35.7% of votes, while the Social Democrats were on 27.0%.
The SPD will try to form a coalition with the Greens and the pro-business FDP - a so-called "traffic-light coalition", Kevin Kuehnert, the SPD's secretary general, said.
The Greens took 18.1% of the vote based on the exit poll, increasing their share by 11.7 percentage points, while the FDP was at 5.5%.
"North Rhine-Westphalia always sends an important signal for federal politics," Nico Siegel, the executive director of pollster infratest dimap, had said ahead of the election.
The centre-left Social Democrats have dominated North Rhine-Westphalia (NRW) -- home to more than a fifth of Germany's population and to the rust-belt Ruhr region -- for most of the past half century.
But the party lost to former Chancellor Angela Merkel's conservatives in its worst state election in 2017. A few months later, it suffered a record defeat at the federal level.
The CDU has governed the state in a coalition with business friendly FDP since 2017. But even with its lead over the SPD in Sunday's vote, it did not secure a majority with the FDP, which lost 7.1 percentage points compared with four years ago.
The Greens co-leader Ricarda Lang said the party wants to push through climate-friendly policies in the state, and will go into a coalition with the party that would pave the way for that.
LOCAL ISSUES
Last week, the CDU won by a landslide in the smaller northern state of Schleswig-Holstein, but in NRW it has had a harder time.
Local issues, such as affordable rents and public transport, are usually key issues for voters in state elections.
Manfred Guellner, head of pollster Forsa, told Reuters that job security and the impact of the dismantling of coal-fired power plants were important issues for voters.
The CDU's Schleswig-Holstein win was seen partly driven by the popularity of state premier Daniel Guenther. In NRW, its candidate Hendrik Wuest only took office in October and has not had time to build a following.
Wuest said his party had the mandate to lead a government in the state.
"The voters in North Rhine-Westphalia have made a clear decision. We, the @CDUNRW_de, clearly won the election!" Wuest said on Twitter.
Thomas Kutschaty, the SPD candidate, said the results were below expectations, but said the SPD was open to talks with all democratic parties on building a government.
(Additional reporting by Maria Sheahan Editing by Alison Williams and Jane Merriman)