President of Ireland Michael D Higgins has warned about politicians trying to divide people based on race, religion and nationality.
Mr Higgins told a conference on Brexit and the future of Europe that all the issues that will test the EU in the future are common to everyone on the planet - climate change, migration and jobs.
"In the absence of an adequate and inclusive discourse and emboldened by those who seek to mimic the language of the far-right for short-term electoral advantage, these political forces - exploiting and drawing on the despair, alienation and anomie of citizens - seek to divide us against one another on the grounds of ethnicity, religion and nationality," the President said.
"While not succeeding in recent electoral contests to achieve majorities in the short term, their gains represent a formidable challenge to any future social cohesion."
In a wide-ranging address on the future of Europe, President Higgins called for a focus on hope rather than fear.
"Let us therefore in the European Union lift our gaze to encompass the needs of all humanity, all of their history, their possible futures, and let us do such with recognition of all of our cultural diversity," he said.
"After all the challenges which will test the European Union in this century - climate change, global migration, the future of work - are common to us all on our fragile and shared planet.
"Our best aspirations, our sustainable future, can only be met by restoring social cohesion and promoting social justice within our institutions here at home, within the institutions of the European Union, and within our global institutions.
"Our horizons must be limitless, for we, all of us, owe to each other an imprescriptible moral duty.
"We need a new mind for our times, a mind informed by hope rather than fear, not only for Europe but for humanity itself on our shared and vulnerable planet."
Mr Higgins told the conference to mark the opening of Dublin City University's Brexit Institute that the last 30-plus years had seen a trajectory towards increasing inequalities of income, wealth, power and opportunities across societies and countries.
Mr Higgins said it continues to be presented as some natural order of things.
He also praised French president Emmanuel Macron and said it was refreshing to see a leading politician outline a programme for Europe.
"I would like to agree with President Macron - in the strongest terms - that we are at a moment when we must recognise that the Union cannot, as in the past, be reconstructed from above, but can only, if it is to survive in this new century, be renewed and rebuilt from below," he said.
But Mr Higgins warned that a Franco-German agreement on the future of the EU will not be enough to answer the deep and sincerely held concerns over equality.
The conference was also addressed by Hilary Benn, chairman of the UK House of Commons Committee on Exiting the EU, and Herman Van Rompuy, President emeritus of the European Council.