Facebook has promised new measures to help Germany counter racism and anti-migrant abuse on the internet.
Facebook says it will promote "counter speech" in Germany to combat such prejudices and will deploy experts to monitor hate speech and act against it.
It was a response to German government concern about a spate of race hate messages, some targeting politicians who defended the rights of migrants.
The government has urged Facebook to do more to delete and combat racist abuse.
Germany's official welcome for a record number of refugees - mainly from Syria, Iraq and Afghanistan - has triggered a backlash from nationalists, including neo-Nazis.
German Justice Minister Heiko Maas discussed the matter on Monday with Richard Allen, Facebook's public policy manager in Europe.
"This is a task that involves the whole of society, and I am very thankful to Facebook that it is recognising its responsibility," Mr Maas said later.
Facebook action plan
In a statement sent to the BBC, Facebook announced "three new steps to counter xenophobia on the [German] platform":
- Partnership with FSM - a German non-profit community group which aims to protect young people on the internet
- A task force "to look at hate speech on the internet... and counter xenophobia" - participants will come from online community groups, political parties and the German justice ministry
- A broad campaign "to promote counter speech in Germany", including the involvement of experts from the UK and Nordic countries, who have fought racism on social networks.
The Facebook statement said "debate can take place in robust terms as long as people do not cross over into using hate speech against protected groups or set out to organise violence against others".
Mr Maas and other critics have previously accused Facebook of acting immediately to remove nudity from users' pages, while allowing racist and xenophobic comments to remain online.
Facebook says it relies on its users to report offensive comments that incite hatred.
Facebook stresses that its "Community Standards" already prohibit hate speech and incitement to violence. That ban covers the targeting of people based on race, national origin, religion, sex or disability.
Under German law, incitement to hatred against such groups is punishable by a prison term ranging from three months to five years.
Anyone who publicly belittles or denies Nazi crimes - especially the Holocaust - can face a jail term of up to five years or a fine.
And anyone who publicly promotes Nazism or glorifies it can face three years in jail or a fine in Germany.
Last week a German Green Party video urged citizens and Facebook managers to act against anti-immigrant hate messages on social media.
In the four-minute video, the Greens' parliamentary leader, Katrin Goering-Eckardt, read out some anti-immigrant abuse she had received, calling it "dirt that belongs in the bin".
Germany expects at least 800,000 migrants - most of them refugees - to arrive this year.