NEW DELHI (AP) — Hampered by heavy election losses at home, President Barack Obama promised from India on Sunday to make "midcourse corrections" to reinvigorate his embattled domestic agenda in the face of a testier American public and more combative Congress.
On a day of friendly outreach, Obama also was confronted about his support for Pakistan, New Delhi's nuclear neighbor and rival. He defended the alliance while acknowledging that Pakistan-based extremists are "a cancer" with the potential to "engulf the country."
His comments took on added significance because he spoke in Mumbai, where memories are fresh from attacks in 2008 by Pakistani assailants that killed 166 in the city. Obama urged the two nations to talk peace; he didn't commit the U.S. as middle man.
Domestic politics followed Obama across the globe, and he tried to explain how he will recalibrate his presidency from the rubble of this past week's elections. The topic came up not in response to a question from a Washington reporter but rather an Indian college student, who told Obama: "It seems that the American people have asked for a change."
The president agreed that people vented their frustration about the economy by sacking many incumbents. A "healthy thing," he said, even though his Democratic Party suffered, losing control of one of the chambers in Congress. He said he would not retreat on spending money for energy and education, and offered no specific policy changes.
But then he added that the election "requires me to make some midcourse corrections and adjustments. And how those play themselves out over the next several months will be a matter of me being in discussions with the Republican Party."
Obama's words reflected the new political reality, sinking in by the day, that he must give ground to have hopes of advancing the leftover promises of his 2008 campaign. He is increasingly likely to compromise on extending tax cuts not just for the middle class but for the rich, at least temporarily, and will focus more on bringing down the federal deficit.
For all his emphasis on jobs and security, Obama was determined to make Sunday a more casual expression of his engagement in India. And this picture emerged: a rigid but good-spirited attempt by the president to dance with children, who pulled him from his chair to join them and his wife, Michelle, already participating gracefully.
That scene unfolded at a school where the Obamas spoke with students about science projects and helped celebrate the religious festival known as Diwali. Said one boy afterward: "I am feeling very proud."
The centerpiece of Obama's day was his stop at St. Xavier College, a Jesuit institution where students waited for hours outside for him in the heat.
Obama has used this town hall format in his foreign travels as a comfortable way to connect with people, although by the time he was done offering advice to the students, he only had room for six questions.
One of the sharper ones was this — "Why is Pakistan so important an ally to America, so far as America has never called it a terrorist state?"
There were some murmurs from the audience.
Obama said it was OK. He knew it was coming.
Muslim-dominated Pakistan and Hindu-majority India have gone to war and still hold deep suspicions. Indian officials accuse Pakistan's intelligence service of helping orchestrate the Mumbai attacks and say Islamabad has not done enough to crack down on the Pakistan-based extremists held responsible.
Pakistan views India's ties with the U.S.-backed government in Afghanistan as an effort by its old rival to encircle it.
Obama even got a prickly response from some Indian commentators on his first day in the country for failing to mention Pakistan when honoring the memories of those killed in the Mumbai attacks.
To his audience Sunday, he said the Pakistani government understands the dangerous elements that hide and operate within its borders. He also defended the strategic importance of Pakistan to the United States, as he has about India.
"We will work with the Pakistani government in order to eradicate this extremism that we consider a cancer within the country that can potentially engulf the country." He said the U.S. approach is to "be honest and forthright with Pakistan, to say we are your friend, this is a problem and we will help you, but the problem has to be addressed."
The president sought to make the difficult case that India has a rooting interest in Pakistan's success, arguing that stability for its neighbors could help push peace and more economic growth for India. He encouraged peace talks and offered support, but not more. "India and Pakistan have to arrive at their own understandings," he said.
Continuing his 10-day trip to Asia, Obama planned to speak to the Indian Parliament on Monday, with announcements expected on counterterrorism, regional security, clean energy, climate change and economic growth.
The president is spending two nights in New Delhi before moving onto Indonesia, South Korea and Japan.
Associated Press writers Ravi Nessman and Erica Werner contributed to this report.