Pakistan will no longer act as a hired gun in someone else's war, Prime Minister Imran Khan said on Friday, striking a note of defiance against US demands for Islamabad to do more in the battle against militancy.
Khan - who also reiterated his backing for a recent push by the US for talks with the Taliban in Afghanistan - said in a televised address that he wants Pakistan to move forward with "honour".
"We will no longer fight someone else's war, nor will we bow down in front of anyone", the former cricketer said.
Islamabad joined Washington's "war on terror" in 2001, and says it has paid a heavy price for the alliance, which sparked an Islamist backlash and homegrown militant groups who turned their guns on the Pakistani state, costing thousands of lives.
Security has dramatically improved in recent years after a military crackdown.
But the US continues to accuse Islamabad of ignoring or even collaborating with groups such as the Afghan Taliban and the Haqqani network, which allegedly attack Afghanistan from safe havens along the border between the two countries.
The White House believes that Pakistan's Inter-Services Intelligence agency and other military bodies have long helped fund and arm the Taliban both for ideological reasons and to counter rising Indian influence in Afghanistan.
It believes that a Pakistani crackdown on the militants could be pivotal in deciding the outcome of the war.
Khan, who has long been vocal about Pakistan's role in the war on terror, said his country wants "peace with all".
"Thanks (God) that today, the same people who were asking to do more are now asking us to help them in Afghanistan, to establish peace and to negotiate," he said.
More than 17 years after the US invasion, Washington has stepped up its bid for talks with the resurgent Taliban with a flurry of recent diplomatic efforts.
This week the Pakistani foreign ministry said Khan had been sent a letter by US President Donald Trump seeking Islamabad's support in securing a peace deal.
In the letter, Trump said a settlement is "his most important regional priority", the Pakistani foreign ministry stated.
"In this regard, he has sought Pakistan's support and facilitation", it continued.
Trump's letter was followed by a visit from US envoy Zalmay Khalilzad, who has said he hopes a deal can be in place before the Afghan presidential elections, set for April next year.