The responses given by the army chief Gen Ashfaq Parvez Kayani and the Director General of the Inter-Services Intelligence (ISI), Lt. Gen. Ahmed Shuja Pasha to the Supreme Court in connection with the alleged memo did not have the approval of the competent authority as required under the rules of business, Gilani said.
No summary or formal proposal seeking the approval of the competent authority for these two replies was initiated by the Defence Ministry, Gilani said during an interview with People's Daily Online of China.
No approval was obtained for the replies from the Defence Minister, Gilani said told the web edition of the state-run Chinese daily.
Any official action by a government functionary without the prior approval of the government is unconstitutional and illegal, he said.
Gilani pointed out that the Supreme Court Chief Justice had observed that any act of a government functionary without the government's nod is unconstitutional and therefore illegal.
The Prime Minister said in both the memo controversy and the recent NATO air strike on Pakistani military border posts, the civil and military leadership of Pakistan had held detailed meetings and taken immediate decisions.
He said both issues were referred to the Parliamentary Committee on National Security and the government had accepted the resignation of Husain Haqqani, Pakistan's former envoy to the US.
After the memo issue was referred to the parliamentary committee, the Supreme Court took suo moto action, he said.
Gilani described the memo as a letter written by one American national to another American.
This is not the first time that Gilani has criticised the army and ISI for their handling of the memo issue.
Gilani was recently angered by an affidavit submitted to the apex court by Defence Secretary Khalid Naeem Lodhi, a retired general considered to be close to the army chief. Lodhi's affidavit had contended that the civilian government had no control over the operational matters of the army and the powerful ISI.
Gilani responded by saying it was unacceptable for the army to act like a state within a state.
The civilian government and the military adopted divergent stands when the apex court took up the memo issue. The government challenged the court's jurisdiction to hear the matter, saying it was already being investigated by the Parliamentary Committee on National Security.
The chiefs of the army and ISI urged the court to conduct an independent probe.
The alleged memo, made public by Pakistani-American businessman Mansoor Ijaz, sought US help to stave off a feared military coup in Pakistan after the killing of Osama bin Laden in May last year.