Chancellor Angela Merkel’s conservative bloc has won a lacklustre victory in Germany’s national election while the anti-migrant Alternative for Germany party managed a triumphant entry into parliament, projections have shown.
Ms Merkel’s main centre-left rivals the Social Democrats were set for their worst result since the Second World War.
The party, led by Ms Merkel’s challenger Martin Schulz, vowed immediately to leave her coalition government and go into opposition.
The outcome puts Ms Merkel on course for a fourth term as chancellor - but means she has a tricky task in forming a new coalition government.
Projections for ARD and ZDF public television, based on exit polls and early counting, showed Ms Merkel’s Christian Democratic Union and their Bavaria-only allies the Christian Social Union winning about 33% of the vote - down from 41.5% four years ago.
Mr Schulz’s Social Democrats were seen trailing far behind, with 20% to 21%.
It would be the outright worst post-war result for the party, which has served since 2013 as the junior partner in a "grand coalition" of Germany’s biggest parties under Ms Merkel.
Ms Merkel was greeted at her party’s headquarters by supporters applauding and chanting "Angie!"
She said: "Of course, we would have preferred a better result, that is completely clear.
"But we mustn’t forget that we have had an extremely challenging parliamentary term behind us.
"We have a mandate to form a new government and no government can be formed against us."
Smaller parties were the chief beneficiaries of the erosion in support for Germany’s traditionally dominant parties - above all the right-wing Alternative for Germany (AfD), which was set to win up to 13.5% of the vote.
AfD capitalised on discontent with established politicians but particularly targeted those angry over the influx of more than one million mostly Muslim migrants into Germany in the past two years under Ms Merkel.
AfD co-leader Alexander Gauland vowed "we will take our country back" and promised to "chase" Ms Merkel.
"This is a big day in our party’s history. We have entered the Bundestag and we will change this country," Mr Gauland said.
Another big winner was the pro-business Free Democratic Party, which was set to return to parliament with 10.5% of the vote.
The party was Ms Merkel’s coalition partner in her second term from 2009-2013 but lost all its seats at the last election.
"In a country that is big on schadenfreude, our comeback is an encouraging message - after failure, a new beginning is possible," party leader Christian Lindner told supporters.
The traditionally left-leaning Greens were seen winning around 9.5% of the vote and the Left Party some nine per cent, meaning both stay in parliament.
Mrs Merkel said that she does not plan to try leading a minority government.
Her current coalition partners, the centre-left Social Democrats, said after Sunday’s election that they will not join the next government.
Germany has no tradition of minority governments, so that would leave Mrs Merkel trying to thrash out an untried coalition with the pro-business Free Democrats and left-leaning Greens.
Asked on German public television whether a minority government of just her own conservative Union bloc is conceivable, Mrs Merkel replied: "I think that stable German governments are a value in itself, that our whole parliamentary system is different from those in countries that have a long tradition of minority governments."
She added: "I don’t see it. I have the intention of achieving a stable government in Germany."