Pakistan's powerful military has agreed in a rare move to cut its hefty budget for a year to help ease the South Asian country's "critical financial situation," Prime Minister Imran Khan said.

Pakistan has struck an agreement in principle with the International Monetary Fund for a $6 billion loan but Islamabad is expected to put in place measures to rein in a ballooning fiscal and current account deficits to get access to the funds.

The IMF has said the primary budget deficit should be trimmed by the equivalent of $5 billion, but previous civilian rulers have rarely dared to trim defense spending for fear of stoking tension with the military.