Hundreds of protesters have taken to the streets in central Berlin after exit polls showed that the far-right Alternative for Germany (AfD) party had become Germany's third-largest political force.

Shouting slogans such as "All Berlin hates the AfD!" and ''Nazi pigs!", the demonstrators gathered outside a building in Germany's capital where the anti-immigrant party's leaders were celebrating winning an estimated 13.1 percent of the votes in Sunday's federal poll.

Several protesters threw bottles as police kept them away from the building.

READ MORE: Angela Merkel on track for fourth term

The AfD, which will be entering parliament for the first time, was founded just four years ago as an anti-euro force. Its manifesto included a pledge to ban all mosques and criminalise people wearing the veil.

The election result produced shockwaves, both internationally and domestically. Luxembourg Foreign Minister Jean Asselborn said Nazis are back in the German parliament.

"Seventy years after the end of the war, neo-Nazis are again sitting in the Bundestag," Asselborn told DPA news agency, referring to Germany's lower house of parliament.

Major Jewish groups also expressed alarm and dismay about the nationalists' strong showing on Sunday.

Josef Schuster, president of the German Central Council of Jews, said the party "tolerates far-right thoughts and agitates against minorities".

He said he expects Germany's other parties will "reveal the true face of the AfD and unmask their empty, populist promises."

Under Merkel's leadership, Germany opened its doors to about a million asylum seekers at the height of Europe's refugee crisis in 2015, prompting fierce criticism from the AfD leadership, who say her stance has had an unacceptably high fiscal, social and administrative costs.