After a heavy electoral defeat, US President Barack Obama received huge applause befitting a rock star from thousands of students as he delivered a nostalgic speech on his childhood, including some local lingo, praising Indonesia as a powerful force for tolerance.

An enthusiastic audience welcomed Obama as he appeared Wednesday morning on the podium of the graduation hall of the University of Indonesia’s Depok campus in Greater Jakarta.

Using Indonesian for a second time, Obama, who spent four years of his childhood in Jakarta, said: “Thank you for your warm welcome. Pulang kampung nih… [I’m coming home],” which caused a burst of applause and laughter.

Around 6,000 university, college and high school students from Greater Jakarta, university staff, Obama’s former classmates, prominent public figures, officials from embassies, former Indonesian president B.J. Habibie, Indonesian Cabinet ministers and government officials crowded the hall.

Obama, who claimed “Indonesia is a part of me”, recalled his memories as a boy who moved to a small house in 1967 in Menteng Dalam, Central Jakarta, after his mother married an Indonesian named Lolo Soetoro.

“I learned to love Indonesia while flying kites, running along paddy fields, catching dragonflies, and buying satay and bakso from the street vendors,” he said, adding that he used to call a satay vendor: “sate ...’,” to the laughing crowd.

“Most of all, I remember the people — the old men and women who welcomed us with smiles, the children who made a foreigner feel like a neighbor, and the teachers who helped me learn about the wider world,” he said.

Obama then praised Indonesia’s economic development and its transition from authoritarian rule to democracy as he touched upon the more serious topic of development, democracy and religion.

“Indonesia has charted its own course through an extraordinary democratic transformation — from the rule of an iron fist to the rule of the people. In recent years, the world has watched with hope and admiration, as Indonesians embraced the peaceful transfer of power and the direct election of leaders,” he said.

“Your achievements demonstrate that democracy and development reinforce one another,” he said, citing Bhineka Tunggal Ika (unity in diversity) as the foundation of Indonesia’s democracy.

This was the third major speech in a Muslim country after Egypt and Turkey over a year as part of his efforts to bridge the gap between the Western and Muslim worlds.

“In the 17 months that have passed we have made some progress, but much more work remains to be done,” Obama said.

“No single speech can eradicate years of mistrust” but he promised, “No matter what setbacks may come, the US is committed to human progress. That is who we are. That is what we have done. That is what we will do.”

He then praised Indonesia as example of a working pluralistic society. “Just as individuals are not defined solely by their faith, Indonesia is defined by more than its Muslim population.

“That is not to say that Indonesia is without imperfections. No nation is,” Obama said. “But here can be found the ability to bridge divides of race and regions and religions.”

Obama emphasized the importance of building bridge as the two countries committed to double the number of American and Indonesian students studying in each others’ countries.

“We want more Indonesian students in our schools, and more American students to come study in this country, so that we can forge new ties that will last well into this young century,” he said.

Obama closed his encounter with the Indonesians by getting off the stage and shaking hands with the audience in the front row.

Some of his former classmates shouted from the second row, calling, “Barry, long time no see”.

Later in the day Twitter was full of speculation about Obama’s ghostwriters, centering on two reportedly good looking young White House staffers.