US President Barack Obama has criticised the pace of Pakistan's fight against militants within its borders.
"Progress is not as quick as we'd like," said Mr Obama.
He was speaking in the Indian city of Mumbai on the second day of a 10-day Asian tour designed to boost US exports and create jobs.
Mr Obama called for dialogue between India and Pakistan, adding that India was the country with the biggest stake in Pakistan's success.
US support for Pakistan is one of the most sensitive issues Mr Obama faces during his visit, says the BBC's Mark Dummett in Delhi.
Many Indians think the US cannot be trusted as long as it continues to supply weapons to Pakistan's army, this country's "enemy number one", adds our correspondent.
No distractions needed
Answering questions from a gathered crowd of students at St Xavier's College, Mr Obama gave an impassioned defence of US policy in the region.
One student asked him why the US did not declare Pakistan a terrorist state.
"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," said Mr Obama.
He said that India would benefit the most from a peaceful and prosperous Pakistan, and that it did not need the distraction of instability in the region.
The US president said he hoped one day to see trust develop and dialogue begin between the nuclear-armed neighbours, which have fought three wars in the past 60 years.
"My hope is that over time, trust develops between the two countries, that dialogue begins, perhaps on less controversial issues, building up to more controversial issues," he said.
As India succeeded economically, he said, it did not want the distraction of insecurity and instability in the region.
Earlier in his visit, Mr Obama visited the scene of the 2008 attacks in Mumbai, saying India and the US were united against terrorism.
Mr Obama's tour follows US mid-term elections that saw heavy losses for Democrats, seen in part as punishment for the US administration's inability to tackle high unemployment.
Before the trip, Mr Obama spoke of the need for greater US access to India markets as part of a drive to double US exports over the next five years and help revive the economy at home.
Trade between India and the US was worth about $40bn in 2008 - still significantly less than US trade with other partners like China and Europe.
Security is tight for Mr Obama's visit. Thousands of Indian and US security personnel are deployed and a US naval warship is on patrol in the waters off the coast of the city.
Later on his trip, Mr Obama will announce a "comprehensive partnership" including economic ties in Indonesia, attend a G20 summit of global economic powers in Seoul and participate in an Asia-Pacific economic forum in Yokohama, Japan.