Egypt finally has a freely elected president. That hardly brightens the prospect for a transition to true democracy, however, given that the country’s generals have made clear it is they who are actually in charge.

It’s a familiar tale, with recent parallels in Pakistan and Turkey, where overbearing militaries have also manipulated the democratic process. In Pakistan, the result is a failing state. In Turkey, civilians have prevailed, producing an economically strong, regionally influential country. Their stories offer lessons to the West about how to help steer Egypt in the direction of success.

Egypt’s generals have traveled a long distance from the days, 18 months ago, when they distanced themselves from President Hosni Mubarak and let the revolution against him take its course. Today, their diffidence has been replaced by an increasing bullishness. In recent weeks, they have dismissed the elected parliament, arrogated new powers, and put Mohamed Mursi of the Muslim Brotherhood on notice that he can assume the presidency only if he accepts the military’s oversight.

There were signs of the coming recrudescence. When Egypt’s interim government rejected a badly needed assistance package from the International Monetary Fund, it was at the urging of the military. The IMF demanded reforms that would have impinged on the prerogatives of the military, whose enterprises account for a third of the economy.

Brazen Taunts

The military was also behind raids on nongovernmental organizations working to promote democracy in Egypt, including three U.S. groups. Those moves were matched by brazen taunting of political parties -- especially Islamist groups -- with warnings that they had better not take their newfound liberties too seriously.

The military saw little reason to restrain itself. The sagging economy and fatigue with revolution produced a nostalgia for authoritarianism among many Egyptians. The international community seemed largely indifferent. That the U.S. authorized military aid to Egypt even after the NGO affair convinced the generals there would be no retribution for a power grab.

In many of their moves, Egypt’s generals seemed to be following the 1988 script of their Pakistani counterparts. After the demise of military dictator Zia Ul-Haq in a plane crash, the Pakistani army withdrew to its barracks and let free elections bring a civilian government to power. However, the generals informed Prime Minister Benazir Bhutto that her authority was limited to simple administrative issues and she could not interfere with the military’s role in the economy. When she defied them, the military used a constitutional amendment from Zia’s days to dismiss her. It did the same with her successor and with Bhutto again until a 1999 military coup interrupted democracy.

Pakistan resumed elections in 2008, but democratic institutions remain feeble. This month, the judiciary fired the prime minister for failing to investigate the president for corruption. Two decades of this charade have made for a weak country, infested with corruption and extremism, on the edge of instability.

Turkey’s military also tightly controlled the democratic process from 1993 to 2002, mostly using the judiciary to discipline and control politicians. The courts dismissed an Islamist-led government in 1997 and twice banned Islamist parties.

But in Turkey, the military’s gambit has failed. Beginning in 2002, with the landslide parliamentary victory of the mildly Islamist Justice and Development Party, the military’s hold on power began to slip. Over the past two years, civilians have gained the upper hand.

Weak Institutions

Which way might Egypt go? Egypt’s civilian institutions are weaker than those of either Pakistan or Turkey, whose democratic traditions date back to the 1950s. Turkey’s economy in the early 2000s was stronger than Egypt’s is now and was less controlled by its generals. It helped that Turkey’s Islamist parties moderated their positions, something Egypt’s Muslim Brotherhood has not done with much credibility.

What may matter most, however, is the role of the international community. The U.S. supported democracy in Pakistan in principle, but its sympathies were with the military. American aid didn’t prevent the military from strong-arming the civilian government, nor did it stand in the way of the 1999 coup that upended democracy altogether.

The European Union, by contrast, made clear that Turkey would have no future with Europe if its military ran the government. Turkey agreed to those terms as part of the criteria for EU candidacy. The closer Turkey got to Europe politically and economically, the weaker the military’s hand became, and the stronger civil society and the private sector grew.

The future of democracy in Egypt will largely depend on whether Western powers respond as the U.S. did to Pakistan or as Europe did to Turkey. Accordingly, the U.S., in particular, should work to protect Egypt’s young democracy. It can do so by using its considerable leverage with the Egyptian military, achieved through decades of close connections and $1.3 billion in annual aid.

This would not mean engaging in the day-to-day grind of Egyptian politics, a futile undertaking. Rather, the U.S. should push the generals for meaningful economic reform, such as privatization, lifting trade restrictions, and encouraging direct foreign investment. These measures would clip the military’s wings while empowering civil society and the private sector. That is what set Turkey on its path to prosperity and democracy. It can work for Egypt, too.

(Vali Nasr is a Bloomberg View contributor, dean of the Paul H. Nitze School of Advanced International Studies at Johns Hopkins University and a senior fellow in foreign policy at the Brookings Institution. The opinions expressed are his own.)

Read more opinion online from Bloomberg View. Subscribe to receive a daily e-mail highlighting new View editorials, columns and op-ed articles.

Today’s highlights: the editors on the Supreme Court’s Montana decision and the limits of Italy’s technocracy; Clive Crook on U.S. health care’s overheated politics; Edward Glaeser on the troubling history of federal mandates; Peter Orszag on natural-gas cars and trucks; Richard J. Carroll on why a president’s economic performance depends on his predecessor’s record; John C. Dugan and T. Timothy Ryan Jr. on why the Dodd-Frank law puts to rest “too big to fail.”

To contact the writer of this article: Vali Nasr at vnasr@jhu.edu

To contact the editor responsible for this article: Lisa Beyer at lbeyer3@bloomberg.net