CHANCELLOR Angela Merkel’s conservative bloc has won a lacklustre victory in Germany’s national election while the anti-migrant Alternative for Germany party will enter parliament for the first time, according to exit polls.

Merkel’s main centre-left rivals the Social Democrats were set for their worst result since the Second World War. Led by Merkel’s challenger Martin Schulz, they vowed immediately to leave her coalition government and go into opposition.

The outcome puts Merkel on course for a fourth term as chancellor but means she faces a tricky task in forming a new coalition government.

Projections for ARD and ZDF public television, based on exit polls and early counting, showed her Christian Democratic Union and their Bavaria-only allies the Christian Social Union had won about 33 per cent of the vote, down from 41.5 per cent four years ago. Schulz’s Social Democrats were trailing far behind, with 20 to 21 per cent.

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 Merkel.

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 – most of all the right-wing Alternative for Germany (AfD), which was set to win up to 13.5 per cent 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 Merkel.

AfD co-leader Alexander Gauland vowed “we will take our country back” and promised to “chase” Merkel.

He said: “This is a big day in our party’s history. We have entered the Bundestag and we will change this country.

Another big winner was the pro-business Free Democratic Party, which was set to return to parliament with 10.5 per cent of the vote.

The party was Merkel’s coalition partner in her second term from 2009-13 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 looked to have won about 9.5 per cent of the vote and the Left Party some nine per cent, meaning both stay in parliament.