WASHINGTON — President Obama and Pakistani Prime Minister Nawaz Sharif sought to strengthen their countries' fragile relationship with a two-hour Oval Office meeting Wednesday that touched on sensitive subjects, including U.S. drone strikes, Afghanistan's future and the security of Islamabad's growing nuclear arsenal.

In their first face-to-face meeting, the leaders said they emphasized mutual efforts to stabilize Pakistan's economy and deal with terrorism and other security threats.

Though Sharif's government is expected to be less pro-American than its predecessor, it badly needs American help in strengthening its economy and bolstering its infrastructure, including its weak energy sector.

Pakistan is also worried that an abrupt U.S. troop withdrawal in 2014 in Afghanistan could destabilize that country's government, sending waves of refugees across the border into Pakistan and potentially increasing the influence of neighboring states, such as India.

During a brief appearance with Obama, Sharif, who was elected in June, said he had raised the issue of drone strikes with the president, "emphasizing the need for an end to such strikes."

U.S. officials have said they are reducing, but not ending, the use of armed drones.

Obama promised that despite years of strain, the administration remains committed to Pakistan.

"We believe that if Pakistan is secure, peaceful and prosperous, that is not only good for Pakistan, it is good for the region. It is good for the world," he said.

Sharif told Obama he was committed to strengthening Pakistan's relationship with India.

"I told President Obama about my sincere commitment to build a cordial and cooperative relationship with India, and our efforts to peacefully resolve all our outstanding issues, including Kashmir," Sharif said.

The prime minister has invited Obama to intercede in the dispute with India over the divided Kashmir region. But the administration has been noncommittal about such a role, which India would probably oppose.

Obama also urged Pakistan to take measures to strengthen control over its expanding nuclear stockpile, saying he was confident that Pakistan was committed to the cause of nuclear safety.

The two countries' relationship hit a low point in 2011 after the U.S. raid in Pakistan to kill Osama bin Laden and the killing of two Pakistanis by a U.S. government contractor.

Obama acknowledged that tension is likely to continue.

There will "inevitably be some tensions ... and some misunderstandings between our countries," he said. "It's a challenge.... It's not easy."

Polls show that anti-Americanism is stronger in Pakistan than in any other country in the world.

To sweeten ties with the new Pakistani government, the United States is freeing up more than $1.6 billion in aid, a portion of which has been frozen because of past disputes.

Sharif said Tuesday in an appearance at the U.S. Institute of Peace that Pakistan wasn't seeking aid, only expanded trade with the United States, its largest trading partner.

paul.richter@latimes.com