Pakistan's prime minister on Sunday rejected a demand by the country's powerful army chief that he clarify or retract his criticism of the army and the spy agency last week, likely raising tensions further in a festering row with the military.

The prime minister ... is answerable to parliament, Yusuf Raza Gilani told reporters in the central city of Vehari. I will not answer to a person. I am answerable to parliament.

Recent tension has raised fears for the stability of the nuclear-armed country and exposed a struggle between the government and the military, which has ousted three civilian governments in coups since independence in 1947 and has ruled the nation for more than half of its history.

Gilani last week criticized Army Chief General Ashfaq Kayani and the director general of the Inter-Services Intelligence agency Lieutenant-General Ahmed Shuja Pasha for filing court papers in a case involving a mysterious memo that has pitted the military against the civilian government.

In an interview with Chinese media, Gilani said the filings were unconstitutional, infuriating the military's high command, who issued a stern press release on Wednesday.

There can be no allegation more serious than what the honourable prime minister has levelled, it said.

This has very serious ramifications with potentially grievous consequences for the country.

Gilani further infuriated the army on Wednesday by sacking the defence secretary, retired Lieutenant General Naeem Khalid Lodhi, for gross misconduct and illegal action which created misunderstanding between institutions.

Lodhi was the most senior civil servant responsible for military affairs, a post usually seen as the military's main advocate in the civilian bureaucracy.

The unusually public sniping comes amid a roiling political scandal involving the mysterious memo.

The memo, allegedly drafted on the direction of former ambassador to Washington Husain Haqqani, asked for U.S. help in reining in the army, which the memo said was planning a coup.

When an American businessman revealed his role in writing and delivering the memo, the army was enraged. Haqqani was forced to resign, and memogate has locked President Asif Ali Zardari and the military in trench warfare ever since.

DIVISIVE STATEMENTS

Gilani's comments were in response to a journalist's question about media reports Saturday night that Kayani was infuriated by Gilani's criticisms.

The army chief complained to Zardari and demanded that Gilani's comments be clarified or withdrawn, a military source told Reuters on Saturday.

Gilani, however, showed no signs of backing down.

What I said was not an accusation, he told reporters. We want there to be respect for the constitution, rule of law, and all institutions to work within their limits. I said just one thing, that rules and procedures were not followed. And that was the defence secretary's fault, for which we removed him from his post.

The military, despite being officially under civilian control, sets foreign and security policies and drew rare public criticism after U.S. special forces killed al Qaeda leader Osama bin Laden on Pakistani soil in a raid in May 2011, an act seen by many Pakistanis as a violation of sovereignty.

Pakistanis rallied behind the military after a November 26 cross-border NATO air attack killed 24 Pakistani soldiers on the frontier with Afghanistan, driving ties with Washington to their lowest point in years.

The latest crisis also troubles Washington, which wants smooth ties between civilian and military leaders so that Pakistan can help efforts to stabilise neighbouring Afghanistan, a top priority for President Barack Obama.

(Additional reporting and writing by Chris Allbritton; Editing by Sanjeev Miglani)