On the morning of Feb. 11, 2011, hours before Hosni Mubarak submitted to the millions of his subjects clamoring for his resignation, a half-dozen retired generals sipped coffee poolside at the Gezira Club, kitted up for tennis and contemptuously dismissed the demonstrators in Tahrir Square. “Who do they represent?” scoffed a man who until recently had worked in state security. “They are loud, but don’t forget there are 79 million Egyptians who are not in Tahrir Square. They are the majority.”

It never crossed their minds that Mubarak might capitulate, as he would do later that day, or that the passivity of most Egyptians did not equal support for a regime that had squandered Egypt’s position at the head of the Arab world while excelling only at abuse and corruption. That rank incomprehension — one might less charitably call it arrogant cluelessness — stretched from the coffee klatch at the Gezira Club through the entire government. Yet Egypt had managed to remain a stable linchpin of American policy in the Middle East for decades, until suddenly it wasn’t.

This transformation, along with the internal decline from pride of the Arab world to shameful decaying autocracy, is the subject of Steven A. Cook’s “Struggle for Egypt: From Nasser to Tahrir Square.” The book clearly was in the making long before the uprising.

Cook’s central contention is that since the military coup of 1952, Egypt’s leaders have never had an ideology. Instead, they have resorted to an increasingly complicated and cruel apparatus of coercion, bullying the citizenry into consent but failing to create any positive reason to support the state.

Cook isn’t trying to tell us why Egyptians revolted in 2011, or what might come next, although his perceptive analysis helps answer both questions. His real aim is to diagnose Egypt’s decline and directionlessness in the modern era, from Nasser’s charisma to Mubarak’s dead-man governing act, and to shed light on America’s role. With meticulous historical context and the acumen of a political scientist, Cook, a fellow at the Council on Foreign Relations, weaves together a narrative drawn from archives, interviews and his own firsthand reporting during a decade of visits to Egypt.

His story begins with a quick survey of Egypt’s modern political awakening, an excellent primer for the uninitiated. Egypt first revolted against its colonizers in 1882, ushering in an age of ferment that included a British-dominated monarchy and a religious awakening inspired by the pioneers of the Islamist revival. Corruption flourished, as did ego-driven power struggles within the elite. Disgust began to reach a boiling point in 1948, when Gamal Abdel Nasser and his Free Officer compatriots fought in Palestine against the newly declared state of Israel. Between the king’s incompetence, the greed of the governing liberals and the Machiavellian scheming of the British, who humiliatingly still occupied the Suez Canal, Egypt’s leaders were doomed.

Nasser’s coup in 1952 threw all the bums out and placed power in the hands of a small group of young, unknown officers, who promised to advance the national interest as impartial technocrats. A charismatic orator, Nasser became the voice and conscience of Arab nationalism, and experimented with reforms that gave land, education and jobs to the peasantry.

Egypt’s people invested great hope in the idea of an apolitical, incorruptible military leadership — a comprehensible but unfounded reflex that prevails again today. The Free Officers tapped a deep and historically grounded wave of rage against foreign interference, a backlash that has never subsided.

Nasser flirted with the Soviets but never embraced Communism. He used the Muslim Brotherhood to achieve power, then ruthlessly crushed the organization when he realized it was becoming too popular to control.

By the time his mismanaged army collapsed in the 1967 war with Israel, Nasser’s reforms had stalled. Anwar Sadat, the weak officer who inherited the presidency in 1970, carved out a power base by gutting what remained of civil society. Sadat relaxed the restrictions on the Muslim Brotherhood and encouraged free enterprise, spawning a wealthy new elite that matured into Mubarak’s crony capitalist circle.

An error has occurred. Please try again later.

You are already subscribed to this email.

Cook does an excellent job telling the story of Sadat’s daring trip to Jerusalem, which quickly and unexpectedly led to the Camp David accords — a peace treaty almost universally reviled in the Arab world, including Egypt. With that one move, Sadat managed to become the darling of the West, while sacrificing almost all his domestic support. Few of his countrymen mourned when he lost his life to an assassin’s bullet in 1981, and his vice president, Hosni Mubarak, assumed power.

The lesson for Mubarak and Egypt’s ruling class was to risk nothing. Gone was Egypt’s sense of destiny as helmsman of the Arab world. Abandoned, too, was the confidence to imagine developmental leaps forward like the Aswan dam.

The joke goes that upon being sworn in, Mubarak took his first ride in the presidential limo. The veteran driver reached a fork in the road. “Nasser always turned left here,” the chauffeur said. “Sadat always turned right. What would you like to do?” After long thought, Mubarak decided: “Just stay where we are.”

Under Mubarak, poverty and inequality leveled off for a time but then began to increase again. The sacrifice of liberties ceased to be a Faustian trade-off for security and economic progress once the government could no longer deliver on bread-and-butter issues. Egypt became little more than a byword for a brutal security state — though one that was a stalwart ally to Washington and Jerusalem.

By the 1990s most of Mubarak’s energy was going into suppressing political dissent and fighting to preserve his special relationship with Washington. He deployed an army of secret police officers and informants that rivaled East Germany’s, infiltrating everything from the doormen’s union to student theater groups. But by 2011, spies, tear gas and heavy-handed repression were not enough to keep him in power.

Readers looking for a full account of this year’s uprising will have to wait for the spate of coming books by journalists, insiders and political analysts. What Cook has given us is a scholar’s well-informed, analytical history, which offers invaluable insights to anyone interested in how Egypt came to its present impasse. “The Struggle for Egypt” is at its best when delivering finely honed details, as when Cook explains the relationship among Egypt, America and Israel. He offers a surprisingly engaging disquisition on Public Law 480, the American “Food for Peace” program that was the progenitor of an unhealthy aid-driven relationship between Washington and Cairo.

But Cook’s storytelling is laced with clichés and hackneyed images (“jaw-­dropping,” “live wire”). This is the kind of book where “the mist off the Nile . . . creates an odd sense of foreboding and anticipation” on the morning of the 1952 coup. (Was it really the mist, or was it the tanks surrounding all the government buildings?) He awkwardly drops characters he has met into his account without any apparent connection to the narrative, only to allow them to disappear a few pages later.

These stylistic hiccups, however, are merely occasional irritants in a substantial and engaging book. Cook knows his material and gets the important points right. His account should be particularly sobering for American readers, who will find in these pages a damning exposition of why United States aid and political influence are currently viewed with such profound suspicion in Egypt.

History offers today’s Egyptian reformers many warnings, most importantly about the danger of an unaccountable, all-powerful military. Egyptians have long suffered from the gap between their leaders’ rhetoric and practice. Nasser, Sadat and Mubarak spoke the language of revolution, Arab pride and economic prosperity, but presided over a military welfare state that impoverished its people and ruled through systemic torture. This disconnect will plague anyone who tries to resuscitate Egypt after Mubarak. For if the man who ruled for 29 years, 3 months and 28 days is gone, the dysfunctional, Orwellian system he did so much to create and sustain lives on.

THE STRUGGLE FOR EGYPT

From Nasser to Tahrir Square

By Steven A. Cook

Illustrated. 408 pp. Oxford University Press. $27.95.

Thanassis Cambanis is writing a book about Egyptian revolutionaries trying to build a liberal new order after Hosni Mubarak.

A version of this review appears in print on October 23, 2011, on Page BR24 of the Sunday Book Review with the headline: Since Nasser. Today's Paper|Subscribe