German Chancellor Angela Merkel is all set for a fourth term as the federal elections results show that alliance between her centre-right Christian Democratic Union (CDU) and its Bavarian sister party - the Christian Social Union (CSU) will remain the largest bloc in parliament.

Exit poll data from public broadcaster ARD / infratest-dimap (via the BBC) says the CDU/CSU bloc has won 32.5% of the vote, ahead of the centre-left Social Democrats (SPD) and the nationalist Alternative for Germany (AfD) party.

For the SPD, led by Martin Schulz, a result of 20% marks a joint post-war low. Thanking supporters, he said: "The SPD clearly hasn't managed to appeal to our party base."

Merkel will now have to form a coalition government to cross the 50% mark, after a dramatic slide from 41.5% of the vote in 2013.

According to AFP news agency, the SDP has ruled out returning to a coalition with Merkel's party and will enter opposition.

This leaves Merkel with the option of striking a deal with the liberal Free Democrats (FDP), who secured 10% of the vote, and the Greens, who secured 9.5%.

A party spokesman for Die Linke (The Left) party tweeted that the party is "proud" of its second-best result of 9%.

The AfD, which has got 13.5% of the vote, has never been in parliament before but will take seats in the Bundestag alongside the FDP, who will be returning to government.

Assumed to be accurate, the poll marks a huge day for Germany's smaller parties, with Merkel and the SDP losing a huge percentage of their vote share as the four smaller parties surged well beyond the 5% threshold for entering parliament.

Angela Merkel CDU Election 2017
Angela Merkel at the CDU election event in Berlin.Getty Images

Speaking at a CDU event, Merkel said: "The CDU would have hoped for better result, but we mustn't forget – looking back at an extraordinary challenge – that we nevertheless achieved our strategic objectives: we are the strongest party. We have the mandate to form the new government and we will form the new government.

"We have had 12 years of governmental responsibility and it was not a foregone conclusion that we would be the largest party again. But this was also an election that saw the arrival in parliament of the AfD. We will conduct a very thorough analysis; we want to regain those voters who voted for the AfD, to discover their concerns and worries.

"We need to work now for a just and a free country. That means we need to bring together all of the EU countries to fight against the causes of migration and to fight illegal immigration. It is clear that the topic of security is as much a worry for people as the topic of prosperity.

"However, we have a mandate to assume responsibility – and we will now assume it now, calmly with our partners."

AfD chairwoman Frauke Petry described her party's surge in votes as a "political earthquake" on Twitter, saying: "The impossible has become true."

Guardian reporter Philip Oltermann meanwhile reports from the AfD's post-election party in Berlin, where supporters are jubilant. Alexander Gauland, the party's co-leader, said at the event: "We will take back our country and our people".

At the SPD event, Schulz said: "This is another bitter hour in our history, but social democracy has survived and managed to show its strength – even when confronted with an extreme far-right party showing its ugly face."

Another exit poll from public broadcaster ZDF offered slightly different figures. Both sets of results can be found below.

ARD/infratest-dmap Poll

Centre-right CDU/CSU: 32.5%
Centre-left SPD: 20%
Right-wing nationalist AfD: 13.5%
Liberal FDP: 10.5%
Greens: 9.5%
Die Linke (The Left): 9%

ZDF Poll

Centre-right CDU/CSU: 33.3%
Centre-left SPD: 20.8%
Right-wing nationalist AfD: 13.2%
Liberal FDP: 10.1%
Greens: 9.2%
Die Linke (The Left): 8.9%