"There are rumors that the government probably wants to remove them (Army Chief Ashfaq Parvez Kayani and Lt. Gen. Ahmad Shuja Pasha, head of the Inter-Services Intelligence)," Gilani told reporters. "This is absurd. Some opportunist(s) are presenting this theory before the nation, which is wrong," the state-run Associated Press of Pakistani reported.
Some local media have reported their dismissal was likely because of growing tensions between the civilian government headed by President Asif Ali Zardari and the powerful military. There has been speculation about another coup in the country, although Kayani has denied that.
Gilani's government is trying to clear its name from a scandal concerning a memo allegedly seeking U.S. help to rein in the Pakistani military and prevent a possible coup. The government has denied any involvement in the scandal, which led to the resignation of Pakistan's ambassador to the United States.
The so-called memogate scandal has worsened Pakistan's relations with the United States, already strained after the May 2 killing of al-Qaida leader Osama bin Laden by U.S. forces in Pakistan's garrison town of Abbottabad.
Gilani said it was on his request that Kayani and Pasha got extensions of their terms in office and the two did not seek them, APP reported.
"You cannot change the generals in the middle of war," Gilani said while referring to the war on terror.
Gilani denied any tension between the government and the army.
The prime minister, however, had talked last week of conspiracies against the civilian government, accusing the commanders of acting as "state within a state," The New York Times reported.
The Times said speculation about Kayani and Pasha facing dismissals was largely promoted by anti-American media, which suggested the removal of the two generals would make it easier for the United States to carry out its strategy in the region.
The report, however, quoted analysts as saying tension persist between the two sides. One analyst said Gilani's remarks were only an effort to calm nerves.
Dennis Rodman pledges to end trips to North Korea
Scarlett Johansson steps out with fiance after pregnancy reveal