German Chancellor Angela Merkel has joined a Muslim community rally to promote tolerance, condemn the attacks in Paris and rebuke a growing anti-Islam movement.

Speaking at the gathering in Berlin on Tuesday, she urged Germans not to marginalise Muslims or other minorities, saying: "Excluding population groups due to their faith or their origin is beneath the dignity osf our liberal state.

"Hatred of foreigners, racism and extremism have no place in this country."

President Joachim Gauck also addressed the vigil at the Brandenburg Gate, organised by the Central Council of Muslims in Germany under the banner "Let's be there for each other. Terror: not in our name!"

"We are all Germany," Gauck said. "We, democrats with our different political, cultural and religious backgrounds; we, who respect and need each other; we, who want to live life in unity, justice and freedom.

"Our answer to the fundamentalism of the Islamist perpetrators of violence is democracy, respect for the law, respect for each other, respect for human dignity. This is our way of life!"

The vigil came a day after the self-declared Patriotic Europeans Against the Islamisation of the Occident, or PEGIDA, drew a record 25,000 marchers to its 12th weekly rally in Dresden, located in the former communist East Germany.

Charlie Hebdo attacks

Flag-waving PEGIDA members held a minute's silence for the 17 victims of the attack on the satirical newspaper Charlie Hebdo and a siege on a Jewish supermarket.

Their latest protest was met by about 100,000 counter-demonstrators nationwide, who accused PEGIDA of exploiting the French attacks, and who voiced support for a multicultural German society.

Merkel on Monday thanked leaders of Germany's four-million-strong Muslim community for quickly and clearly condemning the violence committed in the name of their faith in Paris.

"Germany wants peaceful coexistence of Muslims and members of other religions" and Tuesday's vigil would send "a very strong message", she said at a joint news conference with Ahmet Davutoglu, Turkish prime minister.

On Sunday, Merkel and Davutoglu joined French President Francois Hollande and other world leaders at a massive solidarity rally in Paris.

Announcing Tuesday's vigil, the Muslim Council and the Turkish Community of Berlin said: "We Muslims in Germany condemn the despicable terror attacks in France in the strongest terms. We want to express our solidarity with the French victims.

"There is no justification in Islam for such acts."

With their vigil, the Muslim group said, they "want to send a message for peace and tolerance, against hatred and violence and for a cosmopolitan Germany which respects and protects the freedom of expression and religion".

The statement said, with a view to the new rise in xenophobia expressed on German streets, that "those who voice racist and Islamophobic slogans strengthen the agitators, arsonists and terrorists".

PEGIDA, launched in October, has grown to set new attendance records week after week and spawned smaller copycat groups nationwide, provoking much soul-searching in a country haunted by its history of Nazi rule and the Holocaust.

The protests have been spurred by a sharp rise in refugees seeking political asylum in Germany, which has been struggling to house the newcomers in converted schools, office blocks and container villages.

Germany last year received more than 180,000 asylum applications, a 57-percent jump from 2013, mostly from Syria, Afghanistan, Iraq, Eritrea and Somalia but also from several Balkan countries.