Angela Merkel was facing damaging losses at the hands of Germany's anti-immigrant party for the second time in two weeks in regional elections in Berlin.
The Alternative for Germany (AfD) party will enter its tenth regional assembly after winning 14.1 per cent according to initial projections.
The Chancellor's Christian Democrats (CDU) suffered their worst ever results in the German capital, with just 17.5 per cent of the vote.
But the results will be viewed with some relief by the Chancellor and her allies, after the AfD fell considerably short of expectations.
Forecast just days ago to win as much as 15 per cent and come third, the anti-Muslim party was beaten into fifth place by the Greens and the Left Party, which each won around 15.5 per cent.
It will still be enough to secure the far-Right its first seats in Berlin's state Parliament since German reunification.
"Berlin continues to stand for social and human decency," Sigmar Gabriel, the German vice-chancellor and leader of Merkel's coalition partner, the centre-left Social Democrats (SPD) said."We have achieved a great result," Beatrix von Storch, one of the AfD's leaders, said. "We have arrived in the capital and are on our way to the Bundestag [the national Parliament]."
"Of course we're not happy that they have won seats in Parliament. But almost 90 per cent of Berliners did not vote for the AfD."
The AfD has been riding high on popular discontent with Merkel's "open-door" refugee policy.
She has suffered considerably worse losses at the party's hands in other states this year - last week the CDU was beaten into third place in the eastern state of Mecklenburg-Western Pomerania by the AfD.
However, the results in Berlin, which is one of the country's 16 federal states, will be seen as highly significant.
For many Germans, the city of 3.6 million people is emblematic of their country's rise from the ashes of World War II and the Cold War, and is inextricably linked with modern Germany's reputation for tolerance and openness.
Michael Muller, the city's Mayor, pleaded with people not to vote for the AfD, warning it "would be seen around the world as a return of the far-Right and the Nazis to Germany".
The Berlin gains represent new territory for the AfD, most of whose successes have been in impoverished areas of the former communist east.
Traditionally left-leaning Berlin is a stronghold for the SPD, and it won the election as expected but suffered heavy losses, securing just 21.6 per cent of the vote compared to 28 per cent in 2011.
Merkel's CDU came second, but with just 17.5 per cent of the vote the result was disastrous for the party.
It will almost certainly be forced out of the Berlin state Government, where it was the junior coalition partner with the SPD, and Muller is expected to seek a new coalition with the Greens and Left Party.
The party of German Chancellor Angela Merkel has gained the worst ever electoral results in the capital’s state elections, exit polls show.
Merkel's Christian Democratic Union (CDU) finished second in Berlin with only 17.5 percent while the anti-immigrant party Alternative for Germany (AfD) came in third with around 14 percent.
The Social Democratic Party (SPD) picked up around 22 percent and remains the strongest party in Berlin’s state assembly.
Frank Henkel, the CDU's top Berlin candidate, described the results as "a black day for the people's parties."
"It is very alarming when fringe parties like the AfD or Die Linke between them attract a quarter of the vote," he said.
Markus Soeder, finance minister of the state of Bavaria, who is from Merkel’s CDU's sister party CSU also called the results the "second massive wake-up call" in two weeks,
The CDU was defeated by the AfD in the chancellor’s home state of Mecklenburg-West Pomerania two weeks ago.
Soeder said a long-term and massive loss in trust among traditional voters threatens the conservative bloc. Merkel's right-left national coalition, he said, had to win back support by changing course on its refugee policy.
The Bavarian prime minster and CSU party leader, Horst Seehofer, also threatened not to support Merkel’s party at next year’s elections if she does not limit the number of refugees, who entered Germany.
He called on the chancellor to introduce an upper limit on refugees, with no more than 200,000 new arrivals allowed in Germany each year. The long-time critic of Merkel’s refugee policy blamed her for the “disastrous” defeat in the election earlier this month.
Merkel, who considers running for a fourth term next year, has come under fire in the country, since almost 1.1 million refugees, most of whom were fleeing war and violence in Iraq and Syria, arrived in Germany in 2015.
Her critics say the administration has not made sufficient contribution to efforts for ending the crises in Syria and Iraq, which are among the main causes of the refugee influx in Europe.
The dissatisfaction about her policies, which have caused her popularity to wane, has raised doubts over the future of her political life.