A protester waves his national flag during a rally at Tahrir Square on Thursday. Protesters demanded an end to military rule.

Editor’s Note: Ellen Lust is an associate professor in the department of political science at Yale University and an associate editor of the journal Middle East Law and Governance. Her books include “Structuring Conflict in the Arab World” (Cambridge University Press, 2005) and the textbook “The Middle East,” which she edited. This column was written in association with The Op-Ed Project, an organization aimed at including more women in opinion writing.

Story highlights

Ellen Lust: Egypt in bumpy transition; daily Tahrir Square goes from festive to combative

She says some there worry democracy might not be worth it; social conflicts so challenging

She says optimism has faded for many in face of worries over economy and Islamist control

Lust: Still, Egypt has essentials for democracy: strong nationalism, faith in elections

CNN  — 

Egypt is on the roller-coaster of transition. It’s a bumpy and hair-raising ride to a destination unknown. But the country is moving. And in that, there’s hope.

In Tahrir Square last Friday, I was struck by the carnival atmosphere: Vendors sold candied apples and baked yams; young boys hawked red, white and-black hats and flags; a crowd gathered to watch cartoonists chalk an oversized military general dressed as Santa Claus. Activists of all political shades shouted poetry and enthusiastic speeches, leading crowds in chanting: “The people want the end of the military regime!” “The people want a civilian regime!” “We are all one!”

But by Saturday, Tahrir Square had become a battleground. Crowds shrunk to die-hards throwing stones and Molotov cocktails, while security forces volleyed tear gas and rubber bullets. From the 18th floor of the locked-down Intercontinental hotel (a barrage of tear gas having abruptly aborted my attempt to speak to those at the edges of the square), I watched as the square cleared out, battles moved to side streets, and then the atmosphere turned quiet.

Briefly. Demonstrators regrouped. Political leaders across the spectrum aired televised condemnation of the police and support for the protesters. And people started streaming again through the streets, across a nearby bridge, and back into the square. It was a sight reminiscent of the nail-biting days of January.

With such off-and-on violence, and rising numbers of dead and injured, some may wonder if democracy is worth it – or even possible.

Many Egyptians are no longer as beamingly optimistic as they were last spring. Then, they dreamed of blooming democracy and booming economies. Today, they want stability.

Tourism has slowed to a trickle, and taxi drivers, hotel workers and souvenir vendors shake their heads at the demonstrators. Capital is fleeing, and foreign reserves drying up.

As people speak their minds, many others – from liberals to conservatives — feel uneasy.

Large numbers of bearded men and covered women, demanding a regime based on Sharia law, frighten Christians and Muslims alike. Clashes between Coptic Christians and Muslims create fear that religious strife will rend Egypt’s multireligious society. And women especially worry that their freedoms are at stake.

Liberals, far less numerous, can also be intimidating. Many in Egypt believe they do not understand or accept “real” Egyptian society and threaten to corrupt it. Last month, a female blogger posted nude pictures of herself and others in a sensational appeal to expand freedom of expression. It led many to complain that too much freedom would corrupt Egyptian society.

Anger against America and Israel also worry many. A 20-something Egyptian, working for a foreign corporation in Egypt, pulled me aside in Tahrir Square to explain that former President Hosni Mubarak had known where to draw the line. These people, he exclaimed, gesturing to those around him, don’t understand the hadud, or limits. Like others, he said he worries they would trade Egypt’s welfare for the Palestinians’ cause.

But even amid conflict and uncertainty, there’s hope. Egyptians who desperately want to escape from nearly 60 years of military-backed authoritarian rule have what it takes to do so.

Egyptian nationalism is strong. Airwaves are filled with nationalist songs, and Egyptian flags abound. Friday’s calls to end the military regime mingled with expressions of nationalism. Huge crowds chanted in unison: “Christians and Muslims, we’re all Egyptians, we are all one,” and, most directly, “Ana Masri!” (“I am Egyptian!”)

There is also strong respect for elections. At Tahrir Square, parties and candidates took advantage of the gathering to distribute pamphlets and urge demonstrators to vote for pro-revolutionary forces. And even with the descent into violence, forces across the political spectrum have urged elections to begin as scheduled.

Debates are intense. Egyptians in the square hotly contested the nature of the Egyptian military and goals for the future. The Salafi Hizb al-Nur (“Party of Light”) called for a regime based on Sharia law; the Popular Front appealed to secular nationalism; and the Muslim Brotherhood demanded a civilian, democratic regime with respect and freedoms for all. As one in Friday’s crowd argued, many Egyptians may need to develop respect for diverging opinions. Yet this is true in many nascent democracies.

Political forces also are well-organized. The Muslim Brothers not only can bring people onto the streets, but also send them home when the time is right. They were critical in rallying crowds last week, where they maintained a space for women to avoid being crushed and jostled by men and a pathway for demonstrators to navigate the crowd. And they were instrumental in returning crowds to Tahrir late Saturday night.

Other forces, too, are gaining strength. In fact, Tuesday’s crowds – despite the Brothers’ refusal to participate in the demonstrations – show that others, too, can mobilize forces.

With a strong sense of nationalism, hotly contested debates, a belief in electoral democracy and organized political forces, Egypt has what it takes to form democracy. It just won’t be easy or fast.

Follow @CNNOpinion on Twitter

The opinions expressed in this commentary are solely those of Ellen Lust.