It's not too surprising that Secretary of State John Kerry would play down the Egyptian military's removal of President Mohamed Morsi, a July 3 event widely considered a coup. The United States sends over $1 billion in aid to Egypt annually and has a close relationship with the Egyptian military; a U.S. law says that it has to suspend foreign aid in cases of a coup, but the Obama administration clearly thinks this would not be in U.S. interests and has been bending over backwards to avoid labeling the coup as a coup.

But Kerry went a step further, speaking Thursday in the Pakistani capital of Islamabad with national media outlet Geo TV. "In effect, they were restoring democracy," Kerry said, according to the Wall Street Journal's Matt Bradley.

"The military was asked to intervene by millions and millions of people, all of whom were afraid of a descent into chaos," Kerry said. That's how many Egypt analysts see the events of early July, when millions of protesters clearly desired military intervention. But Kerry added, more controversially, "The military did not take over, to the best of our judgment ... to run the country. There’s a civilian government." By all appearances, Gen. Abdel Fatah al-Sissi, the defense minister who formally announced the military's removal of Morsi, is the now country's de facto head of state.

The fact that the State Department still wants to avoid calling this a coup is not surprising, but Kerry's strongly worded defense of the military takeover as "restoring democracy" is. Most surprising of all where he said it: Pakistan.

Why is Pakistan a strange place from which to downplay a military coup and signal that you see it as restoring democracy? Well, if there's anyone that the United States probably doesn't want believing that Washington won't oppose coups by military allies, it's the Pakistani armed forces. Pakistan has something of a history of military leaders ousting democratically elected governments. In 1999, military leader Pervez Musharraf was installed as president in a military coup, upsetting the United States. He was in office until 2008 and, after fleeing the country, has since returned and has tried, so far in vain, to climb back into power.

As with Egypt today, the U.S. was in a quandary because it opposed the coup in principle but, after September 2001, felt it was important to work with the Pakistani government, democratic or not. Two years after the coup, the Bush administration got special permission from Congress to reinstate aid to Pakistan, despite the law forbidding aid to coup-backed governments. Since then, the U.S. has strained and at times struggled to balance its desire for Pakistan to move back toward democracy – which it has – against its perceived need to preserve the Pakistani military's help on security matters.

The issue is still a live one for the U.S. in Pakistan, and may become more so, because the U.S. needs Pakistani help or at least acquiescence to continue drawing down troops in Afghanistan. Musharraf, meanwhile, was arrested in April after returning to Pakistan and could face serious charges for suspending the constitution while in office. Analysts worry that case, which would be the first prosecution of a Pakistani military chief in the country's history, could set up a politically destabilizing battle between the courts and military.

Pakistan is a classic dilemma between principles and interests for the United States, one that only gets tougher as Pakistan's military feels more emboldened to intervene in politics. So traveling to the Pakistani capital and telling a Pakistani TV station that a recent military coup by a military ally against a democratically elected president was "restoring democracy," despite initial private warnings from U.S. officials not to go ahead with the ouster, doesn't seem likely to much help the Pakistan situation.