ISLAMABAD, Pakistan — For most of Pakistan's history, the powerful military has held sway over elected officials or simply dumped them from power. Just ask Nawaz Sharif, who was ousted as prime minister in the last military coup, 15 years ago.
Lately, however, a new civilian government is pushing back — led by Sharif. Since he returned to office in June, his government has lodged a case against generals over the disappearance of imprisoned militants and engaged Pakistani Taliban insurgents in a controversial peace process against the army's wishes.
Most recently, Sharif has gone after the man who removed him from power in 1999, Pervez Musharraf. Last month the former military ruler was indicted on treason charges, the first time a serving or former army official of his rank has faced trial for abuse of power. The government and courts have denied the ailing Musharraf's appeals to seek medical treatment abroad.
The military, which has been trying to stay out of politics since Musharraf's rule ended in disaster in 2008, has nonetheless begun to chafe at the civilian government's assertiveness. Last week, army chief Gen. Raheel Sharif, who is not related to the prime minister, showed a flash of irritation during a visit to a military base, saying the army would "preserve its own dignity and institutional pride at all costs."
The comment by the normally taciturn general was the clearest signal yet of tension between the military and Sharif's government, which won a strong electoral mandate last year but is still widely seen as serving at the pleasure of the military establishment.
"The military leadership was under the impression that the civilian government and the judiciary would not cross red lines in Musharraf's case and that he would be allowed to travel abroad after his indictment," said a senior security official in Islamabad, the capital, who requested anonymity to discuss the generals' thinking.
"A pressure has developed within the institution that the army is being discredited by the civilian government."
The developments present a dilemma for the United States, which is eager to see Sharif's government implement democratic reforms, tackle withering economic and energy crises and improve relations with Pakistan's nuclear-armed rival, India.
At the same time, many in the Obama administration support the Pakistani army's desire to go after Islamist militants in the country's ungoverned tribal regions, particularly as the Pentagon prepares to withdraw most of its forces from neighboring Afghanistan by the end of the year.
U.S. military officials fear that the troop drawdown will give the Pakistani Taliban, known in Urdu as Tehreek-e-Taliban Pakistan, or TTP, more freedom to move in and out of Afghanistan. The Pakistani military has occasionally signaled that it would launch an offensive, but Moeed Yusuf, director of South Asia programs at the United States Institute of Peace, a nonpartisan Washington think tank, said that wouldn't occur without the backing of civilian officials.
"If you ask Washington and others, they would say the focus needs to be developing a coherent strategy for targeting the TTP," Yusuf said. "But nobody would want the operation undertaken without civilian blessing and control. The Pakistani military won't do it; they want the political cover."
Musharraf, he added, is a "distraction at best." The 70-year-old former strongman, once a key ally in the George W. Bush administration's anti-terrorism efforts, returned from exile last year in a bid to restart his political career but immediately found himself facing charges stemming from the end of his nine-year rule, during which he imposed a state of emergency and removed senior judges.
An elected government led by Asif Ali Zardari, widower of slain former Prime Minister Benazir Bhutto, took power after Musharraf resigned in disgrace. When Sharif became prime minister in June, it marked the first stable transition between democratic governments in Pakistan's history.
"This is a unique phase in our country," said Amir Mateen, a political analyst in Islamabad. But he said Sharif needed to proceed more cautiously. "The changing equation in the civil-military relationship needs to be done in a very cordial way."
There are signs that Sharif's approach has limits, particularly as talks with militants have stalled. On the all-important issue of India, Sharif has deferred to the military, which is opposed to making swift concessions to its rival. Last month, Sharif's government called off a deal that would have normalized trade between the countries.
"Pakistan's approach to India, despite the initial declarations of Nawaz Sharif after his election victory last summer, remains essentially the same," said a senior Indian official who wasn't authorized to be quoted by name.
Civilian officials have often invoked the example of Turkey, where over the last decade a powerful army has ceded authority to Prime Minister Recep Tayyip Erdogan's democratically elected government. But military officials say that Erdogan, who took office in 2003, carried out the transition gradually and won confidence through his handling of economic and domestic affairs, qualities Pakistan's government has yet to show.
"Our ruling party has been trying to do in the first year of its term what Erdogan's government succeeded in doing after three terms," said Athar Abbas, a retired major general and former army spokesman.
"The army has been fighting the war of survival of this nation," he said. "It will react to any effort to corner it or discredit it."