For German Chancellor Angela Merkel, a fourth term is on the agenda.
But she will have to form a coalition government after her Christian Democratic Union and Christian Social Union alliance got its worst result yet under her leadership.
Exit polls suggest the two parties have received just over 30 per cent of the vote.
Ms Merkel says the result was not what she hoped for.
“No question about it, we had hoped for a slightly better result. That’s totally clear. We, the CDU/CSU, are the strongest party. We have a mandate to form a government, and there can be no government formation against us.”
The Social Democratic Party says it will go into opposition after winning 20 per cent of the vote.
The party previously was the junior partner in Ms Merkel’s grand coalition, but it has instead chosen to become the main opposition party.
Social Democrats leader Martin Schulz has conceded defeat, describing the result as a “bitter day.”
“Today is a hard and bitter day for the German social democracy. I don’t want to avoid that issue. We have not achieved our goal. After the defeats we had in our stronghold, North-Rhine Westphalia, we have also lost the parliamentary election.”
Angela Merkel has been in the top job for 12 years.
But the alliance has lost ground to nationalist groups, a backlash against the Chancellor’s pro-immigration policies.
In fact, the nationalist Alternative for Germany party appears to have secured the third-highest number of votes.
It is a shocking result to many, and one that means the party will enter the German Bundestag for the first time, with 13.5 per cent of the vote.
Top candidate Alice Weidel says the party aims to be constructive in opposition.
“We have been given an electoral mandate, and we will accept this electoral mandate with humility, because millions of voters have given us their trust to carry out constructive opposition work in the German parliament. And we will deliver, Ladies and Gentlemen, we will deliver!”
The party is only four years old.
An anti-Euro group of academics formed it, but it has shifted into an anti-immigration party and profited from Ms Merkel’s 2015 decision to leave borders open to refugees.
More than a million refugees have since found their way into Germany, mostly from the Middle East.
The Alternative for Germany’s deputy head, Beatrix Von Storch, has called the vote a “revolution.”
“We’re going to experience a revolution of the party landscape. After a drift to the left by the CDU and the entire system, we will have a centre-right party again. We’ll see debates in the Bundestag that we haven’t seen for a long time, and we are looking forward to that.”
Hundreds of people took to the streets of Berlin in protest at the party’s election to the Bundestag.
CDU supporter Simon Lang describes the result as “a disgrace.”
“It’s terrible, of course, that the AfD will enter the Bundestag with such a good result. I think it’s a disgrace for Germany. But I hope that a good coalition will be put together for the future of Germany.”
Support for Ms Merkel’s bloc, considered the traditional conservatives, was the lowest since 1949, the first time national elections were held in postwar Germany.
The haemorrhaging in support for the CDU and CSU has fragmented the parliament.
It leaves Ms Merkel in the difficult position of having to pull together a three-way coalition, with a pro-business group and the Greens.
The Chancellor admits the coming weeks will be difficult.
“And the next few weeks won’t be easy, but we, the CSU and CDU, are parties that take responsibility for our country, for our program and for what is important to us and the people. And, in this spirit, we will succeed in the next week. I’m convinced of that.”