Pakistan's prime minister fired the defence secretary Wednesday in a dispute over a memo sent to Washington that has enraged the army, escalating a crisis pitting the civilian government against the powerful military leadership.

The army warned darkly of "grievous consequences" as a result of the standoff, which is hampering U.S. efforts to rebuild shattered ties with the nuclear-armed nation that are needed to negotiate an end to the war in neighbouring Afghanistan. The tensions have consumed the ruling elite in a country that is struggling to overcome economic turmoil and a bloody al-Qaeda fueled insurgency.

The developments were a sign of near-open conflict between the army and the government. Relations between President Asif Ali Zardari and the generals have never been good, but have soured dramatically in recent months.

inside-pakistan-gilani-0173

Pakistani Prime Minister Yousuf Raza Gilani is reported to have accused the army chief and the head of the spy agency of violating the constitution. (Muhammed Muheisen/Associated Press)

Instability has dogged the government since it took office in 2008 after a 10-year army dictatorship, and there have been frequent, wrong predictions of its demise. While unpopular, the government has a solid majority in parliament and it's unclear whether the army or the Supreme Court have the stomach to unseat it.

The unsigned memo sent to Washington asks for its help in reining in the power of the military in exchange for favourable security policies. It was allegedly masterminded by Pakistan' envoy to Washington, who resigned in a failed attempt to stem the fallout.

Outrage in army

The affair has outraged the army, which has portrayed it as a treasonous threat to national security.

Acting under army pressure, the Supreme Court ordered a probe to establish whether the memo had been sanctioned by Zardari, a prospect that could lead to impeachment hearings. As part of the investigation, army chief Gen. Ashfaq Pervez Kayani and the head of the main spy agency, Lt. Gen. Ahmed Shuja Pasha, said in statements submitted to the court that the memo was genuine and part of a conspiracy against the army.

Prime Minister Yousuf Reza Gilani said in an interview to a Chinese newspaper this week that Kayani and Pasha had violated the constitution by submitting the statements. The interview was also published by Pakistan's state-run news agency. The army denied the men's actions were illegal, and said in a statement that Gilani's allegations had "very serious ramifications with potentially grievous consequences for the country." It did not elaborate.

Gilani's office later said that Defence Secretary Naeem Khalid Lodhi, a retired general and army loyalist seen as a bridge between the high-command and the civilian government, was dismissed for "gross misconduct and illegal action." He was replaced with Nargis Sethi, who is close to Gilani, the statement said.

In a move that some Pakistani media outfits speculated was somehow connected with the growing crisis, the army announced it had appointed a new commander for the "111 Brigade," which is responsible for security in Islamabad and Rawalpindi and has in the past carried out coups. The army said the posting was part of a "routine" rotation.

The defence secretary's signature is needed on letters to appoint or dismiss military leaders, and Lodhi's firing triggered talk on Pakistani television that Gilani was seeking to dismiss Kayani by installing a loyalist to the position.

Cabinet minister Khursheed Shah told reporters this was nonsense and that the current "rise in temperature" was mostly media hype. "The government doesn't want any kind of confrontation with any state institutions," he said.

On Tuesday, the Supreme Court, which is believed to be hostile to the government and has been used by the army in the past to sanction coups, warned it could dismiss Gilani unless he followed court orders to pursue a once-shelved corruption case against Zardari. It called Gilani dishonest and said he had violated his oath of office by ignoring the order.

It ordered the government to attend proceedings next week to explain its inaction.

"I think the lines have been drawn, now it depends on who fires the next shot," said Rasul Bakhsh Rais, professor of political science at Lahore University of Management Sciences. "It is a three dimensional war: the judiciary, the political executive and the armed forces."

Growing pressure on government

Observers say political pressure is growing to topple the government before Senate elections scheduled for March. Regional and national lawmakers are expected to vote along party lines, giving Zardari's party a majority in the upper house, which would ensure him significant political power for the next six years.

The country also is to hold general elections next year, although some are pushing for the vote to be held sooner.

That prospect now appears increasingly likely, and could be one way out of the crisis.

Gilani said he thought the Senate elections would take place on time, and declared "democracy will continue in the country and democracy is a destiny for Pakistan."

Some pundits have speculated that the ruling party itself may want to be deposed by the army, believing it could then get a sympathy vote in new elections and fire up its base by presenting itself as a victim. Having presided over near economic collapse, widespread corruption and poor or nonexistent governance, it can't relish the prospect of running on its record.

Most analysts say the army has little appetite for a direct coup but is happy to allow the Supreme Court to end the current setup via "constitutional" means. "We can't rule out those impulses (an army coup). They are rooted in history, but right now the army have decided not to. Rather they will stay by the sidelines and watch the court," the analyst Rais said.

The turmoil is coinciding with a near-break down in relations with the United States following American airstrikes on the Afghan border last November that killed two dozen Pakistani soldiers. Islamabad shut down vital supply routes into Afghanistan and forced the U.S. to vacate Shamsi Air Base in southwestern Baluchistan province.

Late Wednesday, gunmen shot and killed 14 paramilitary Pakistani soldiers, a security official said, before escaping back into the hills. Baluchistan is home to separatist rebels and Islamist militants, and both routinely attack state forces in the poor, remote region.