Bill Clinton has warned that the Brexit vote was about people thinking differences are more important that what they have in common.
The former US president also suggested that some people who backed the split from the EU last year were not fully aware of what they had voted for.
After being honoured by Dublin City University for his work on peace and reconciliation in Northern Ireland, Mr Clinton said he used the example of the Good Friday Agreement shamelessly around the world.
The accord was signed in 1998, mid-way through his two terms in the White House, after he took a more hands-on approach to US diplomacy at the height of the Troubles.
Mr Clinton warned about inequalities and divisions spreading around the world.
"Now there are lots of people who think they are less human," he said.
"Now given the economic inequalities and the rapid pace of social change and all the upheaveal that's going on .... people are reassessing whether what we have in common is more important than our differences.
"A lot of people begged to differ.
"That's really what the Brexit vote is all about."
Mr Clinton, who was given an honorary doctorate in DCU, the highest award the college bestows, suggested that some Brexit voters may only be realising the impact of the loss of access to the EU Customs.
Mimicking a voter, he added: "I'm sorry we can't stay together, we had a disagreement. Oh my God, I didn't know I was going to lose that customs thing and all these econ benefits. Why didn't anyone tell me that?"
Mr Clinton added: "All partnerships that are community-based are held together not because everybody agrees with everybody else, not because we don't still have our particular identities, but because co-operation is better than conflict or isolation in any environment in which you must be in touch with others.
"It's a simple proposition. But we are re-litigating it now."
Mr Clinton said this happened in the Brexit vote but also in elections in France, Germany, the Netherlands and Austria.
"In every place there was a nationalist party that said the other is dragging us down. We can't accommodate all this diversity," he said.
"The world is now in a conflict whether we should stop our mingling with others at the tribal level or whether communities are better; whether diverse groups make better decisions and create wealth and life and opportunity or homogenous ones do as they don't push us so hard and we feel more secure.
"We can't get away from each other so we should look at our neighbours without regard to their race, religion, their orientation or whatever."
Mr Clinton was understood to be travelling to Northern Ireland after the ceremony.
He said the peace process and power-sharing arrangements in Belfast was just one example of the debate on whether it is better to live together or apart.
Mr Clinton called for universities to be places of honest discussion about whether it is better to live in a tribe apart, or a community of many tribes with shared values and mutual respect.
"Believe me, it is just one example of what is dominating the discussion all over the world," he said.
"Some thought needs to be given before we abandon community to return to tribe. You can keep your tribe."
He added: "You don't have to give up your tribal identity to respect your larger humanity, without which the world will not continue to thrive.
"How we think about this will determine how we deal with everything else, with climate change, with the largest species destruction rates in 10,000 years, with vast inequalities."
Mr Clinton described the Good Friday Agreement as a "wonderful blinding moment of bigness".
"The children of God and humans chose community," he said.
"Nobody abandoned their tribe, they just lived in the same neighbourhood.
"We must make that choice again. How we think will determine what we do with every other challenge facing us. It is the most important thing."
In a citation for Mr Clinton, Professor Gary Murphy, of DCU's School of Law and Government, said: "Nowhere, however, has the ability and gifts of this remarkable man to make a difference been more evident than in Northern Ireland.
"This transformative leader devoted considerable energy to the Northern Ireland peace process, and he did so long before it was politically popular.
"It is no exaggeration to say that the success of the Northern Ireland peace process is in very many ways due to the fact that President Clinton took the view that it was a conflict that could be resolved by his personal input and by the power and influence of the USA."
Prof Murphy added: "Peace-making is always difficult, but there can be little doubt that the conflict in Northern Ireland was ultimately resolved because that great beacon of liberty, the USA, decided that it could use its influence to make the vital difference.
"That fateful decision was taken in the Oval Office by President Bill Clinton."
Prof Murphy also paid tribute to Mr Clinton's work responding to the 2004 tsunami and 2010 earthquake in Haiti.
DCU Chancellor Martin McAleese said the impact that Mr Clinton and the others being honoured - Sister Stanislaus Kennedy, a lifelong social justice campaigner, and Glen Dimplex founder Martin Naughton - had on Ireland was immeasurable.
"But what we do know is that we are in their debt," Mr McAleese said.