Barack Obama was presented with the Freedom of the City of Dublin at a clandestine ceremony in the Irish capital.
The former US president said in a statement that he accepted the honour with “deep humility”.
The Irish capital’s highest civic honour is for people who have made “an outstanding contribution to the world” and whose values “reflect those cherished” by Dubliners.
“These are, undoubtedly, times of great challenge and great change,” he said.
“But it is in moments like these that we are reminded of who we truly are.
“We are people, the Irish and Americans, who never stop imagining a brighter future for us all.
“That defiant, enduring hope has always been an unshakeable bond that connects our two countries, and so many others around the world.
“May we continue to strengthen those ties, and keep working to make our world a little more just, more equal, more prosperous, and more free.”
His wife Michelle Obama was also awarded the Honorary Freedom of the City of Dublin in 2017.
Mr Obama signed the Roll of Honour during the short ceremony and was presented with a gift of a first edition of Ulysses, a bottle of Dublin Whiskey by Teelings and a commemorative scroll with calligraphy by Aoife Lyons.
Crowds had gathered outside the Shelbourne Hotel in the hope of catching a glimpse of the former US president as he arrived after 3.30pm on Thursday.
Some wore American football jerseys while other carried helium balloons depicting US President Donald Trump as a baby.
Lord Mayor of Dublin Ray McAdam said it was a “great honour” to confer the Freedom of the City on Mr Obama on behalf of the citizens of Dublin.
“This award recognises not only his remarkable achievements as president of the United States, but also his steadfast commitment to democracy, equality, and the power of community.
“President Obama has inspired millions around the world with his leadership and his vision for a fairer, more compassionate society.
“It is fitting that Dublin now welcomes him as a freeman of our city.”
Only 88 people have ever received the Freedom of the City since it was first awarded in 1876, including John F Kennedy and Bill Clinton, Nelson Mandela and Mikhail Gorbachev.
The Government was represented at the ceremony by Finance Minister Paschal Donohoe; former taoiseach Brian Cowen was also in attendance.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.