US Secretary of State Antony Blinken said Pakistan's policies have been "on many occasions detrimental to our interests, on other occasions in support of those interests."

US Secretary of State Antony Blinken called on Pakistan to deny legitimacy to the Taliban unless they meet international demands. He also admitted that Pakistan was involved in harbouring terrorists of the Taliban, including the Haqqanis.

Testifying before Congress on the Taliban victory in Afghanistan, Blinken heard from lawmakers across party lines who pushed for a harder line on Pakistan, an uneasy partner of Washington over the 20-year war.

"What we have to look at is an insistence that every country, to include Pakistan, make good on the expectations that the international community has of what is required of a Taliban-led government if it's to receive any legitimacy of any kind or any support," Blinken told the House Foreign Affairs Committee.

He said the priorities included ensuring the Taliban let out people who want to leave Afghanistan and respect the rights of women, girls and minorities, as well as adhere to promises that the country not again become "a haven for outward-directed terror."

"So Pakistan needs to line up with a broad majority of the international community in working toward those ends and in upholding those expectations," Blinken said.

Blinken said Pakistan's policies have been "on many occasions detrimental to our interests, on other occasions in support of those interests."

Pakistan's actions have "involved hedging its bets constantly about the future of Afghanistan," he added.

"It's one that's involved harbouring members of the Taliban, including the Haqqanis," Blinken said, referring to the group designated as terrorists by Washington that is now part of the caretaker government.

Democratic Representative Joaquin Castro, one of several lawmakers to criticize Pakistan, called on the United States to consider removing its status as a major non-NATO ally, which gives Islamabad privileged access to US weaponry.

Pakistani intelligence had close ties with the Taliban dating from the Islamist guerrillas' rise in the 1990s and Pakistan was one of only three countries to recognize its 1996-2001 government, which was notorious for its repression of women's rights as part of an ultra-austere interpretation of Islam.

Pakistan, a Cold War ally of the United States, quickly pledged cooperation in the US-led "war on terror" after the September 11, 2001, attacks.

But Pakistan has frequently viewed Afghanistan through the prism of its historic rivalry with India, a major partner to the fallen Western-backed government.