US National Security Advisor Lieutenant-General H.R. McMaster arrived in Pakistan on Monday on an unannounced visit, a day after he hinted that Washington could take a tougher stance with Islamabad.
It was the first visit by a top member of President Donald Trump's administration to the militancy-hit country.
At his previous stop in neighbouring Afghanistan he suggested Washington may take a stronger line with Islamabad, for years seen as an unreliable US ally.
A statement by Prime Minister Nawaz Sharif's office said McMaster had "assured the Prime Minister that the new administration was committed to strengthening bilateral relations and working with Pakistan, to achieve peace and stability in Afghanistan and in the wider South Asian region."
McMaster's visits are being closely watched for clues to the Trump administration's future course of action in the region.
US-led NATO troops have been at war in Afghanistan since 2001, after the ousting of the Taliban regime for refusing to hand over Osama bin Laden following the 9/11 attacks in the United States.
The US has around 8,400 troops in the country with about another 5,000 from NATO allies, as efforts to negotiate a lasting peace settlement between Kabul and the Taliban have repeatedly fallen through.
Afghanistan routinely accuses Pakistan of providing safe haven to the Afghan Taliban.
"As all of us have hoped for many, many years, we have hoped that Pakistani leaders will understand that it is in their interest to go after these groups less selectively than they have in the past and the best way to pursue their interest in Afghanistan and elsewhere is through diplomacy, not through the use of proxies that engage in violence," McMaster said in an interview with Afghanistan's Tolo News Sunday.
The Pakistani statement added that McMaster's delegation included Lisa Curtis, whom US media have previously reported as his pick as senior director for South and Central Asia.
Curtis recently co-authored a paper calling on the US to stop treating Pakistan as an ally and instead "focus on diplomatically isolating" it if it continues supporting groups linked to international terror.
The US embassy said McMaster also met Pakistan's army chief General Qamar Javed Bajwa and other officials and described the meetings with Pakistani leaders as productive.
"General McMaster expressed appreciation for Pakistan?s democratic and economic development, and stressed the need to confront terrorism in all its forms," it said in a statement.
Last Thursday the US military in Afghanistan dropped its largest non-nuclear bomb in combat for the first time anywhere. The target was a Islamic State group hideout and officials said up to 95 militants were killed.