Forcefully returning to a theme he sounded last year in visits to Turkey and Egypt, Obama said: "I have made it clear that America is not and never will be at war with Islam. ... Those who want to build must not cede ground to terrorists who seek to destroy."
Beaming with pride, Obama delivered perhaps the most intensely personal speech of his presidency, speaking phrases in Indonesian to a cheering crowd of more than 6,000 mostly young people who claimed him as their own. It felt oddly like one of the campaign speeches Obama had been giving in the U.S., with music blaring over speakers inside the auditorium.
More on President Obama's Asia Trip:
For Obama's standing abroad, the speech was closely watched and consequential, an update on America's "new beginning" with Muslims that he promised last year in Cairo.
"Let me begin with a simple statement: Indonesia is part of me," he said in Indonesian at the University of Indonesia.
He praised the world's most populous Muslim nation for standing its ground against "violent extremism" and said: "All of us must defeat al Qaeda and its affiliates, who have no claim to be leaders of any religion. ... This is not a task for America alone."
Seeking to cement relations with fast-growing Asian trading partners, Obama also paid tribute to the economic dynamism of the region at a time of global financial stress.
"America has a stake in an Indonesia that is growing, with prosperity that is broadly shared among the Indonesian people - because a rising middle class here means new markets for our goods, just as America is a market for yours," he said.
The speech came ahead of a meeting of the Group of 20 major economic powers that begins Wednesday evening in Seoul, South Korea, expected to be marked by trade tensions between the U.S. and major exporting nations such as China and Germany.
Earlier Wednesday, Obama visited the Istiqlal Mosque, the largest in Southeast Asia. He noted that it was under construction when he lived in Indonesia as a boy from 1967 to 1971.
"Because Indonesia is made up of thousands of islands, hundreds of languages, and people from scores of regions and ethnic groups, my times here helped me appreciate the humanity of all people," Obama said.
The president's brief but nostalgic visit lent an unusually personal tone to the speech, a portion of which was he devoted to his childhood here. Obama reminisced about living in a small house with a mango tree out front, and learning to love his adopted home while flying kites, running along paddy fields, catching dragonflies and buying such delicacies as satay and bakso from street vendors. He also spoke of running in fields with water buffalo and goats, and of the birth of his sister, Maya, who is half Indonesian.
Obama, a Christian who was born in Hawaii, moved to Indonesia as a 6-year-old and lived with his mother, Stanley Ann Dunham, and Indonesian stepfather, Lolo Soetoro. He attended public and Catholic schools while in Indonesia and returned to Hawaii when he was 10 to live with his grandparents. Obama said in the speech that he is a Christian; back home in the U.S., he is fighting erroneous perceptions that he is Muslim.
The president's homecoming had been twice-delayed - first because of the health care legislative battle and then because of the BP oil spill. "We had a couple of false starts," he noted. This trip was to be cut short, too, so Air Force One could depart ahead of a big ash cloud from the erupting Indonesian volcano Mount Merapi.
After the speech, Obama shook hands with some in the audience, including several former classmates seated in the front row. Others screamed as if Obama were a pop star.
Reaching out to the Islamic world, Obama said efforts to build trust and peace are showing promise but are still clearly incomplete.
"Relations between the United States and Muslim nations have been frayed over many years. As president, I have made it a priority to begin to repair these relations," Obama said.
He said both sides have a choice: either "be defined by our differences and give in to a future of suspicion and mistrust" or "do the hard work of forging common ground and commit ourselves to the steady pursuit of progress."
Obama praised Indonesia for having "made progress in rooting out terrorists and combating violent extremism."
Noting that the path from colonial rule to democracy had been a rocky one, Obama said democracy "is messy." And, a week after seeing his own Democratic Party suffer bruising midterm election defeats in the U.S. Congress, Obama added: "Not everyone likes the results of every election. You go through ups and downs. But the journey is worthwhile."
On the Middle East, Obama noted the "false starts and setbacks" in getting the peace process between Israel and the Palestinians back on course. But he said the U.S. will "spare no effort in working for the outcome that is just and that is in the interest of all the parties involved: two states, Israel and Palestine, living side by side in peace and security."
A reminder of that difficult road awaited Obama when he landed in Indonesia Tuesday. Israel's decision to build more apartments in east Jerusalem, a disputed territory claimed by Palestinians, had already earned a rebuke from American diplomats before a tired, traveling president weighed in.
"This kind of activity is never helpful when it comes to peace negotiations," Obama said when questioned at a news conference alongside Indonesia's president, Susilo Bambang Yudhoyono. "I'm concerned that we're not seeing each side make the extra effort involved to get a breakthrough. ... Each of these incremental steps can end up breaking down trust."
Obama gave substantial attention to the new partnerships his government has reached with Indonesia's.
The two presidents touted a deal that will have both countries cooperating on energy, education, the environment and many other subjects. More broadly, Indonesia offers the United States one more strategic, democratic voice in a continent of emerging powers and lucrative markets, while U.S. support can help Indonesia's own economy and regional security.
Both leaders pushed back against the idea that Obama's efforts aim, at least in part, to counter China's rise.
Obama also pointedly noted that the global economy is out of whack, saying some countries have run up huge surpluses and have intervened significantly in the currency markets to maintain their advantage. The U.S. contends China's undervalued currency gives Beijing an unfair trade boost in the selling of its goods.
China and Germany, however, have suggested that the U.S. Federal Reserve's announcement last week that it would in effect print $600 billion to buy longer-term U.S. Treasury bonds over the next eight months - in an effort to drive down interest rates and stimulate the U.S. economy - had further driven down an already weak dollar, worsening global trade tensions.
That's sure to be a top topic at the G-20 meeting in South Korea.