The rhetoric on the annual Defense Day remembrance of Pakistan's fighters in a 1965 war with India underscores rising tension between the nuclear-armed foes after New Delhi last month revoked the autonomy of its part of disputed Kashmir.
"I have informed the world that Pakistan does not want war, but at the same time, Pakistan cannot remain oblivious to the challenges posed to its security and integrity," Khan said in a statement on the website of state-run Radio Pakistan.
"We are prepared to give the enemy the fullest possible response. Failing, the world community will be responsible for the catastrophic aftermath," he added.
This week Khan had said war between the South Asian neighbors was a risk, but Pakistan would not act first.
Khan has led a vigorous international diplomatic campaign seeking the support of the United States, former colonial power Britain and others to press India over the Himalayan region, but his Hindu-majority neighbor has ruled out outside involvement.
Pakistan will never abandon Kashmir, army chief General Qamar Javed Bajwa told a defense function in the city of Rawalpindi.
"We are ready to give sacrifice for our Kashmiri brothers, will fulfill our duty till last bullet, last soldiers and last breath," he said in a televised speech. "And we are prepared to go till any extent."
India flooded the Kashmir valley with troops, restricted movements and cut off communication as Prime Minister Narendra Modi withdrew special rights for Kashmir on Aug. 5.
Indian-controlled Kashmir lost its right to frame its own laws and non-residents were allowed to buy property there in changes the government said would drive development and pull the region into line with the rest of the nation.The neighbors have fought two of their three wars over Kashmir.