With only days left before Egyptians are expected to vote in their first elections since the fall of president Hosni Mubarak, thousands of people have taken to the streets to pressure the military to relax its grip on power. On Tuesday, the prime minister and cabinet resigned, and the ruling military council pledged to transfer power to a civilian government by July 1, 2012. Whether or not they deliver on their promise remains to be seen.

Since Saturday, protesters spanning every political ideology from secular to Islamist, have rallied to pressure the ruling Supreme Council of the Armed Forces to establish a clearer roadmap toward the end of the nearly 60-year old military regime and bring about democratic government. As the rising violence makes clear, they will settle for nothing less.

Last week the country’s transitional authorities worked to build consensus around a “constitutional declaration” limiting the military’s role in the new government, and ensuring that the committee members who draft Egypt’s next constitution come from a range of political and ideological factions. But with the election approaching, a number of Islamist parties, including the powerful Muslim Brotherhood, have yet to come to agreement.

Though this constitutional declaration would not be legally binding -- leaving some of the more extreme Islamists, such as the Salafis, the freedom to violate it -- the military elites would like it to be. Even if it takes time to bring radical groups into the fold, the declaration will be a critical step towards stability.

The success of the nearby democratic transition in Tunisia remains crucial to that of other countries in the Arab Spring. During the Egyptian revolution, Egyptians carried posters with the French word “Degage” (get out), imitating the Tunisians. The Tunisians have launched several uprisings since the ousting of president Ben Ali earlier this year, in which they successfully pressured the transitional authorities to make more genuine reforms. Though Egyptians also worry about rising violence, and the potential establishment of a theocratic or neo-military order, Tunisia’s orderly elections will inspire them again.

Late last month, Tunisians voted in their first free elections since the country gained independence from France in 1956. Over 80 percent of registered voters went to the polls to elect a 217-member constituent assembly. The Islamist party Ennahda won 41 percent of the vote, giving it significant leverage, but nowhere near carte blanche. Unlike more conservative parties, Ennahda ran on a ticket of respect for human rights and democratic principles, and the vote will likely force it to deliver on those promises. It will have to form a coalition with secular parties in order to secure a majority, and draft a democratic constitution that safeguards the rights of both Islamists and the secular, women and minorities.

Tunisia’s difficult transition to democracy started in January, when a popular uprising uprising ousted President Zine Abedine Ben Ali, sparking the Arab Spring that has since spread across the region. The Egyptians soon followed in the Tunisians’ footsteps, leading relatively peaceful demonstrations that toppled President Hosni Mubarak in February.

In Tunisia, as in most Arab nations, Islamists are the best funded and organized political parties. Ennahda has been working underground in Tunisia for decades, is well funded, and enjoys national recognition.

In contrast, most secular parties have only arisen since the revolution, giving them less than 10 months to get up and running. Time and the practice of democracy should level the playing field, especially beyond the 2012 legislative elections.

The fact is, at least half of Tunisians voted for secular parties, so unless Ennadha is prepared to impose a new government by force, it will have to represent secular constituencies. The same will likely be true in Egypt.

Even under Ben Ali’s autocracy, Tunisia tolerated a range of political ideologies. As in Egypt, Tunisia’s political scene is highly fragmented and competitive. So far, most major parties in the country have vowed to create a democratic system that includes all political parties and holds all citizens equal before the law.

What’s more, the Tunisian people’s passion for freedom and their ability to use new technologies make it more difficult than it once was for any political constituency to monopolize power. Since Ben Ali’s fall, both mainstream and social media have grown to unprecedented levels in Tunisia, denying would-be tyrants the mantle of revolutionary legitimacy.

The key to any successful transition to democracy, however, is a democratic constitution. This document need not be secular in itself, but it must respect gender, ethnic and religious equality for all citizens.

As we have seen in Egypt, economics plays a major role in the successful consolidation of a new government. Both Tunisia and Egypt need substantial market reforms to unleash their people’s productive potential, and restore international investors’ faith that their money is safe there.

As the Marshall Plan and the Bretton Woods institution did in Europe after World War II, international donors and financial institutions can help restore order in North Africa, and create incentive structures conducive to peace and prosperity.

In the early years of democratic transition, the need for economic assistance will help keep parties committed to democratic processes. Democratic systems will also encourage the transparency, checks and balances necessary to ensure that money is well spent.

Both Tunisia and Egypt rely heavily on tourism, which was among their most important sources of revenue prior to the revolutions. Imposing ultra-conservative values, such as banning alcohol or swim suits, will drive Western tourists away, denying their economies vital revenues.

Here, the new governments will be obliged to respect the Koranic principle of “religion is not compulsory,” meaning that religion and religious practices cannot be imposed on any individual; each should choose freely his religion and the way in which he practices it. This is a basic Islamic tenet of freedom of religion, and one radical Islamists too often ignore.

Tunisia’s elections were the first test of the Arab Spring, and Egypt’s will be the second. The new leaders they bring to power must pay heed to the paramount demand of the Egyptian revolution: the establishment of a democratic order.

In return, the international community should help the new government in Cairo stabilize its economy and consolidate its nascent democratic system, to ensure regular, peaceful successions of power.

Democracy means one citizen, one vote -- and the process must happen more than once.

Khairi Abaza is a senior fellow at the Foundation for Defense of Democracies, and a former senior official in Egypt’s secular liberal Wafd party.