German President Frank-Walter Steinmeier said Tuesday that new "walls of alienation, disappointment and anger" had replaced the physical wall that divided Germany until 27 years ago.
Speaking on national holiday German Unity Day, which marks the reunification of East and West Germany following the 1989 fall of the Berlin Wall, Steinmeier said Germany had come a long way since reunification, however, he warned of new threats rising in the form of xenophobia.
"On September 24th, it became clear that other walls have arisen, less visible, without barbed wire and death-strips, but walls that stand in the way of our common sense of 'us'," Steinmeier said in a speech in the western city of Mainz.
He said these had sprung up "between city and country, online and offline, poor and rich, old and young - walls, from behind which people hardly understand anything of each other."
A poll on Monday showed nearly two-thirds of Germans still see divisions between those in the former communist East and the West, a sort of "Berlin Wall in the head".
In an implicit reference to the ascent of the far-right Alternative for Germany (AfD) into parliament last month, Steinmeier said that "behind these walls, a deep distrust in democracy and its representatives is being fomented."
He said the election had exposed "large and small cracks" in society and he called on democratic lawmakers to work together to fight any return to nationalism.
Steinmeier, a center-left Social Democrat who was foreign minister before taking up the largely ceremonial presidency role in March, also spoke about the refugee crisis and Germany's ability to accommodate asylum seekers, saying that "the realities of the world and the capabilities of our country" had to be reconciled.
Steinmeier said Germany needed an honest discussion about immigration - the issue that fueled the rise of the AfD after Merkel's 2015 decision to leave German borders open to around 1 million refugees, mostly fleeing war in the Middle East.
"The plight of people must never leave us indifferent," Steinmeier said.
Chancellor Angela Merkel also attended the event, and said in a short speech that the lessons from German reunification in 1990 would help Germany to tackle the problems it currently faces.
"We cannot uncouple ourselves from world events," Merkel said. "But we can look back and say that we succeeded in a lot of aspects of German reunification, and that should give us the strength to solve the outstanding problems."
In Germany's new parliament, comprising six party groups compared to four previously, "political culture will change", Steinmeier said.
Chancellor Angela Merkel won a fourth term in office in the election, but a fractured vote means she will have to govern with a far less stable coalition.
The anti-Islam, anti-immigrant AfD won nearly 13 per cent of the vote in the September 24 election, granting it more than 90 parliamentary seats. It is the first time a far-right party has sat in the Bundestag for 60 years. It has vowed to "hunt" the new government, whatever its make-up.
A leading member of the AfD, Alexander Gauland, provoked outrage last month for saying that Germans should no longer be reproached with their Nazi past and should take pride in what their soldiers achieved during World War One and Two.