A prominent ally of German Chancellor Angela Merkel has threatened to take her government to court over its "open doors" refugee policy as political pressure grows for the chancellor to reduce the number of new arrivals.

Bavarian state premier Horst Seehofer said he would send the federal government a written request within the next two weeks to restore "orderly conditions" at the nation's borders, through which one million migrants and refugees passed last year alone.

"If it doesn't follow, the state government will have no other choice but to file a suit at the federal constitutional court," Mr Seehofer told Der Spiegel magazine.

Mr Seehofer has issued a series of ultimatums to Ms Merkel in recent months to press her into taking immediate action to limit the influx of migrants, only to back down at the last minute.

His comments reflect increasing doubt among Germans about Ms Merkel's "we can do this" mantra in the face of Europe's biggest migrant crisis since World War II, especially since sexual assaults in Cologne on New Year's Eve were blamed on migrants.

Ms Merkel's popularity has dropped following the assaults, a poll showed yesterday.

Bavaria, a conservative state that borders Austria to the south, is the home of Mr Seehofer's Christian Social Union (CSU) - sister party to Ms Merkel's Christian Democratic Union (CDU) - and is the main entry point for migrants and refugees.

The state's finance minister Markus Soeder told Der Spiegel that Ms Merkel's refugee policy was not democratically legitimised and said parliament should vote on the matter.

Senior figures from the Social Democrats (SPD), Ms Merkel's second coalition partner, have also broken ranks in recent days by challenging her welcoming approach to asylum seekers.

SPD leader Sigmar Gabriel joined the critical voices saying "we have to get from a chaotic to an orderly immigration."

He said border checks needed to be improved and refugee quotas should be introduced to maintain control over how many people come to Germany and when they arrive.

Germany could take in more than the 200,000 refugees proposed by Mr Seehofer as an official cap for this year, Mr Gabriel said.

"But the quota also has to be significantly below the immigration numbers of the previous year," he added, without giving a concrete figure.

Ms Merkel has vowed to "measurably reduce" arrivals this year, but has refused to introduce a cap, saying it would be impossible to enforce without closing German borders.

Instead, she has tried to convince European partners to take on quotas of refugees, pushed for building "hotspot" reception centres on Europe's external borders and led an EU campaign to convince Turkey to keep refugees from entering the bloc. Progress has been slow so far, however.

Meanwhile, thousands of people have demonstrated against xenophobia and violence in Stuttgart.

Under the motto "Stand together - Baden Wurttemberg against racism and violence" the crowd gathered at Suttgart’s cental Schlossplatz.

The protest was organised by an association of 80 different parties, churches and organisations. According to the police, 7,000 people turned up including many immigrants.