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.
"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]."
"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.
"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.
- additional reporting AP