US Secretary of State John Kerry held talks Thursday with Pakistan's new prime minister which are likely to be dominated by the fight against Islamist militants as US troops withdraw from Afghanistan.
Kerry, who is well respected in Pakistan, is visiting for the first time as secretary of state. He is the most senior US visitor since Nawaz Sharif won a resounding election victory in May.
The nuclear-armed state is a key but fractious ally in the 12-year war against Al-Qaeda. The most public dispute is the US drone strikes on militants that Islamabad officially condemns.
Kerry paid tribute to the polls, which marked the first time that an elected civilian Pakistani government had completed a full term in office and handed over to another at the ballot box.
"This is a historic transition that just took place. Nobody should diminish it," he told US embassy staff.
"I think President (Asif Ali) Zardari deserves credit... It is an enormous step forward. It is historic. In the 66-year history of Pakistan that has never happened. So change comes over time," he added.
He later swept into talks with Sharif, exchanging pleasantries for the cameras before the press were escorted out.
Kerry is later expected to meet the outgoing President Zardari and army chief General Ashfaq Kayani.
Sharif described Kerry as a "wonderful friend".
"I am very happy that he is the secretary of state of the United States of America today and I hope to have very good discussions and talks with him," the prime minister said.
Pakistani-US relations have recovered somewhat from the crisis sparked by the US killing of Al-Qaeda mastermind Osama bin Laden in Pakistan in May 2011.
Although leaked documents show Pakistani leaders have privately supported US drone strikes on Taliban and Al-Qaeda operatives, the government officially condemns them as a violation of sovereignty.
The powerful military, which has ruled Pakistan for around half its existence, has also bristled over US insistence that it do more to eradicate Islamist militants.
The Afghan Taliban and foreign Al-Qaeda-linked operatives have strongholds in Pakistan's northwestern semi-autonomous tribal belt. Washington says they threaten Afghanistan and the West.
But US officials say they are hopeful that the onset of a more stable government under Sharif, with a clear majority, offers a new opportunity to rework relations along realistic objectives.
Pakistan is also suffering from its own domestic Taliban-led insurgency and the government says 40,000 people have been killed as a result of terrorism in the country since 2001.
Since winning the May election, Sharif has said he wants to strengthen Pakistan's relations with Washington, but the United States must take seriously concerns about drone strikes.
He has made economic growth and resolving the energy crisis the top priority of his new administration, but Kerry will stress that prosperity depends on doing more to eliminate militant havens.
A US official told reporters that Pakistan itself was bearing the brunt of continued extremism. The only way for Sharif to accomplish his goals was to assert greater sovereignty over the country.
Pakistan's nuclear arsenal and drone attacks will also be part of the discussions. US officials have previously voiced concern atomic weapons could fall into the hands of Islamist militants.
"The whole purpose of this conversation is to have a very comprehensive, very robust, very serious, very real conversation on the range of our mutual and national security interests," a senior US administration official told reporters.
"It will be hard to imagine that any issue that we think is one of our key national security priorities is not on the agenda."
It is the first visit by a US secretary of state to Pakistan since October 2011, when Hillary Clinton urged Islamabad to dismantle havens for Afghan militants and encourage the Taliban into talks to end the war in Afghanistan.
Nearly two years later, efforts to negotiate an end to the conflict in Afghanistan are in disarray, and the opening of a Taliban liaison office in Qatar in June outraged Kabul.
Relations between Afghanistan and Pakistan are mired in distrust. While the West has praised Pakistani support for peace efforts, many Afghans consider Pakistan an abettor of the Taliban.