Ireland and Scotland have been urged to play a key role in providing the "ethical leadership that is so needed at this moment in our history".
Irish President Michael Higgins highlighted the importance of immigration to the two nations as he addressed MSPs at the Scottish Parliament.
His speech comes at a time when the UK is still coming to terms with last week's vote to leave the European Union (EU), which Ireland remains a member of.
Meanwhile, continental Europe has been dealing with a stream of refugees fleeing from the conflict that has engulfed Syria and the Middle East.
President Higgins described Scotland and Ireland as being countries of "intermixed migrants whose shared existence owes more to the transience of our migrations than to the sedentary experience of possessions or property".
He told MSPs: "If we imagine ourselves in the position of those currently fleeing war-torn Syria, or trapped in an unending cycle of conflict in the Democratic Republic of Congo, or in the position of future generations living in toxic and hostile environments, we could not acquiesce to inaction.
"For a long time, the Irish and the Scots found that our own people were forced to seek sustenance abroad.
"The strength and vitality of our diasporas today can be attributed to the bravery and indomitable spirit that motivated our ancestors to seek not only better lives for themselves and their families, but also to recognise the value of community and to appreciate the welcome they received on foreign shores.
"Perhaps, then, with our traditions and values, we might both be expected to play leading parts in showing the ethical leadership that is so needed at this moment in our history."
He stressed that elected politicians "must be unafraid to challenge outdated policies" and speak out against "inequalities which have ceased to shock us by how widespread and familiar they have become".
A failure to do this could "leave a vacuum that will be exploited, usually by dangerous populisms in the street", the President warned.
He added: "We are challenged to do democracy better rather than resile to old and divisive myths based on exclusion and often what is thinly-veiled hate or racism."
President Higgins recalled the death of Labour MP Jo Cox, saying she "exemplified the very best of principled public representative politics".
He added: "All of us who share her fearless commitment to principled and respectful political debate owe it to her memory to work harder than ever at this crucial moment to strengthen our democratic system and make it work to meet the needs of our people, and not to surrender to fear or bend before the politics of fear."
President Higgins also used his speech to highlight the "enormous potential for partnership and co-operation" between Scotland and Ireland, saying this was "grounded in the values that we share".
He continued: "As two small, in population terms, yet highly-skilled countries with highly-skilled workers on the periphery of Europe, we share a belief that our combined resources, expertise and experiences can create a dynamism that is greater than the sum of our two separate economies.
"Today we see great progress in trade and co-operation in areas such as the creative industries and information technology, as well as in areas such as renewable energies and, of course, in the agri-food sector and in tourism.
"We are both committed to deepening this bond. In the past year alone, Ireland has grown its diplomatic representation in Edinburgh and the Scottish Government has established a representative office in Dublin.
"The potential for growing our work together is, I believe, endless - in culture, in economic and social development, and in promoting the peace, stability and prosperity that have marked the transformative recent decades between these two islands."