MUMBAI — President Barack Obama on Sunday defended the U.S. alliance with India's bitter rival Pakistan, but acknowledged that Pakistan's slow progress in rooting out terrorists "is not as quick as we'd like."
He implored Indians to find a way over time to trust Pakistan — with which their country has fought three wars since 1947 — and help it succeed.
"If Pakistan is unstable, that's bad for India," he said.
His comments at a question-and-answer session with students here were the first he'd made during his three-day visit to India on the touchy subject of Pakistan, which Indians openly brand a terrorist nation and blame for the Nov. 26, 2008, terrorist attack in Mumbai that left more than 160 people dead.
The White House has stressed that Obama's primary mission is to promote U.S.-India trade and generally has not commented on the thorny issue of Pakistan-India relations — even though they are considered critical to resolving the region's conflicts, including Afghanistan, which has increasingly become a proxy battleground for India and Pakistan.
On Saturday, Obama was widely criticized here for commemorating the so-called 26/11 Mumbai attacks without mentioning Pakistan's role — the plot was hatched there.
Obama said Sunday he knew the subject was likely to come up during a free-flowing town-hall style with about 350 university students in a sweltering courtyard at St. Xavier's College in Mumbai.
Obama said Pakistan is strategically important to the United States, but that extremism there is "a cancer ...that can potentially engulf the country.
"I think the Pakistani government understands now the potential threat that exists within their own borders," he said, but added, "Progress is not as quick as we'd like."
"Our feeling has been to be honest and forthright with Pakistan, to say we are your friend, that this is a problem and we will help you but the problem has to be addressed."
The dialogue between the students and the U.S. president covered everything from terrorism to Obama's feelings about Mohandas K. Gandhi, India's founder, to democracy and the morality of capitalism. It was carried live in its entirety and broadcast throughout the day on cable television in India.
First Lady Michelle Obama had introduced her husband, egging on the students to "Ask my husband some tough questions, all right? You've got to keep him on his toes!"
Students grilled him on his views about jihad (he said he believes most Muslims are peaceful and that terrorists must be isolated) and about Afghanistan (he insisted that "a stable Afghanistan is achievable.").
One asked how he incorporates Gandhi's ideals into his life. He said he often fell "woefully short" of the icon but that in his daily life and his policy goals he looks to see "the inherent worth and dignity of every individual."
Another asked about the balance of moral values and materialism. "We should not underestimate how liberating economic growth can be for a country," Obama said, but that a quest only for wealth shows "a poverty of ambition."
One student asked how the recent U.S. elections in which Americans punished Obama's fellow Democrats might affect economic policy with India. Obama suggested the shift of control in the House of Representatives wouldn't inherently affect India.
His broader prediction was for "a tug of war within the United States between those that see globalization as a threat and want to retrench and those who accept that we live in an open and integrated world."
He said Americans are still coming to terms with the fact that rising economies such as China, Brazil and India are testing U.S. dominance. That competition, he said, also means the U.S. has to demand more reciprocity in trade relationships.
But it was the discussion of Pakistan that hushed the crowd.
Many of the students in the audience said afterward that they believe ill will between Indians and Pakistanis is to some extent generational and is easing with time.
"Today's generation is beyond that so in the near future there can be trust," said Divya Moorjaney, 20.
Omkar Khare, 18, a physics student in the audience, said he's most interested in what the United States can do to curb terrorism than in blaming Pakistan's government.
Since the Mumbai terrorist attacks two years ago, he's lived with the realization that "Any day there can be a bomb."
Obama later flew to New Delhi, where he met with the staff of the U.S. embassy, visited the tomb of Humayun, an emperor who ruled India in the 16th Century, and dined with Indian Prime Minister Manmohan Singh.
Officials offered no information on what the president and prime minister discussed and the president did not address reporters before his motorcade pulled away at 9:50 p.m.
(Dion Nissenbaum contributed to this story from New Delhi.)
MORE FROM MCCLATCHY