In Indonesia, where politics is steering extremism as much as it is in the United States, in Europe where jihadis are pushing tolerance to the limit, leaders are needed to restrain the basest elements in society.
Barack Obama's comments came in the wake of a recent scathing exchange on social media between Donald Trump and MSNBC Morning Joe hosts, Mika Brzezinski and Joe Scarborough. "We start seeing a rise in an aggressive kind of nationalism".
The Indonesian visit marked Obama's first trip to Asia since leaving office.
The family visited two of the most treasured ancient temples - Borobudur, a Buddhist complex, and the Hindu compound of Prambanan - in the world's most populous Muslim country.
On Friday, Indonesian President Joko Widodo welcomed the Obamas to the Bogor Palace in West Java.
In his speech on Saturday, Obama reminisced about moving to Jakarta in 1967 when he was just six years old, shouting: 'Indonesia bagian dari diri saya!' or 'Indonesia is part of me!'More news: Rampant Nadal "abused me out there": Millman
She added that the government also wants to establish connectivity between diasporas; for them to form a network and synergize to attract more investors-especially now that Indonesia has an investment grade with BBB- or stable outlook.
He lived in the country with his mother and his Indonesian stepfather. But he said he has never forgotten the years he spent in Indonesia. "So my time here made me cherish and respect for people's differences", he told a packed audience in Jakarta.
In some ways the message was a direct hit on Indonesia, which has been suffering its own bouts of sectarian discord in recent months, driven by a bitter election for the governorship of Jakarta that saw the incumbent, an ethnic Chinese Christian and perhaps the most effective and honest civil official in the country's history, defeated and then imprisoned on trumped up blasphemy charges wielded by Islamic fundamentalists.
"China is the one country North Korea does depend on to some extent and the elites depend on to access foreign currency, basic supplies that are important to the regime", the former president said, according to CNN.
"If we don't stand up for tolerance and moderation and respect for others, if we begin to doubt ourselves and all that we have accomplished, then much of the progress that we have made will not continue", Obama said.
To foster closer ties between Indonesians overseas and government representatives, IDN has established several dialogue sessions, including one with representatives of IDN Qatar, the Society of Indonesian Energy Professionals (SIEP) Houston and the deputy minister of energy and mineral resources, Archandra Tahar.