As Egypt wraps up its presidential election, it is important to remember the irreplaceable role that nation has played in fostering the stability and cooperation that has helped provide critical momentum in various parts of the Middle East.

The United States has many interests in the region and there is a strong desire to see the Middle East region return to a calmer, normal progression. A stable Egypt is a keystone of that regional stability.

Egypt, which has been described as “the heart of the Arab world,” has a vibrant diplomatic corps with tremendous influence in regional and multi-national bodies. Its actions – from building peace with Israel to battling terrorism – set a strong tone.

No discussion of democracy in Egypt or the Middle East can go forward without acknowledging how critical the 1979 Egypt-Israel Peace Treaty is to stability in the region.  That remarkable treaty remains central to U.S. Mideast policy.

Not only did the treaty bring peace between two proud nations, it was also one of the first major blows against terrorism in the Middle East.  Taking away a conflict between Egypt and Israel meant removing one huge opportunity for terrorism to thrive in the largest Arab nation in the world. And the Israeli-Egypt military and intelligence cooperation has been a bedrock in combating global terrorism.

No matter who is elected to Egypt’s presidency, the primary goal will be restoring the country’s teetering economy, of which tourism is a key element.  But to rebuild the economy means the new leadership must successfully deal with what may be the most serious Islamic radical threat in Egypt’s history.

Eleven months after President Morsi's ouster, Egypt's jihadist threat has expanded from a relatively localized problem centered on the Sinai Peninsula to a diverse, three-pronged menace threatening the entire nation.

The first threat still emanates from the Sinai. Despite sending more than 20,000 troops to the region, sophisticated attacks have continued, with the terrorist group Ansar Bayt Maqdis claiming responsibility.

New threats are now emerging in Cairo and other major cities, many born from radicalized, yet cohesive Muslim Brotherhood activist cells. One called Ajnad Masr (Soldiers of Egypt) has claimed attacks which have shown a sharp rise in sophistication since the group first struck in January 2014. Another comes from terrorist groups ,” who transport heavy weapons from Libya across the porous border with Egypt, including an anti-aircraft missile used to down a military helicopter in the Sinai in January 2014.

Regional stability depends on Egypt’s ability to end the violence and then grow as a democracy. The United States has many interests in the region beyond the obvious use of the Suez Canal by U.S. warships and over flight capabilities. At stake are vital democratic and economic alliances that depend on restoring and rejuvenating a strong multi-faceted alliance with Egypt.

Egypt's Western allies have been fractured in support for the transitional government. Indeed, the U.S. has continued to send mixed signals regarding how we value the Egypt-U.S. relationship. We supported Mubarak before we opposed him. We supported Morsi, and then when the majority of Egyptian people came out against him, we failed to heed their call. We withheld military aid, restored it and now again threaten to withhold it again.  Such milquetoast and ambivalence encourages jihadists in Egypt and across the region, who interpret this inability to rally traditional allies as weakness.

Sure there have been many worrying developments in Egypt’s roadmap to the future. Egypt’s independent judiciary has taken some recent actions that have rightfully caused international consternation. But that judicial process provides ample opportunities for review and appeal, even Egypt’s public prosecutor recently condemned the mass death sentences as being marred by flaws. After all it was this same system that freed the Muslim Brotherhood leadership during the Mubarak era. It would be tragic to allow the actions of a few judges to undermine the broad national U.S. interest in supporting Egypt as it moves forward on a path to democracy. This democratic transformation will be pivotal for regional and global peace and security.

Rather than ostracize and isolate Egypt, the West should adopt a policy of proactive engagement, building on the success Egypt has achieved. Last December, Egypt adopted a new constitution which expanded the rights and fundamental freedoms of its people. Relatively free elections have also been organized. We should continue to encourage Egypt to follow in this path. The elections are a crucial step in this regard.

U.S. interests are best served by engaging with the Egyptian leadership during the current power transition and into the future. And, let’s be clear that Egyptians rose on the 30th of June as never before. The events unfolding on that day were the largest mass protests in Egyptian history. It is now clear to most observers that the overwhelming majority of the Egyptian people support the events that have transpired since then.

A truly democratic Egypt will be a bulwark against Islamic fundamentalism and terrorist groups. U.S. support will go a long way towards helping the Egyptian government return to stability after the elections. Many people are looking forward to the upcoming elections as a fresh start. Election monitors from the U.S. and Europe have begun to arrive in Egypt to watch the voting. The upcoming elections are one step to help Egypt to restore order and stability to the country in a legitimate way.

The U.S. must reengage Egypt in a more focused and determined way. Egypt is a crucial power to key U.S. interests in the region. It is not often the U.S. gets a second chance with a crucial ally.  This is one of those rare opportunities.

Coleman served in the Senate from 2003 to 2009, was a member of the Senate Foreign Relations Committee. He is currently of counsel to the law firm of Hogan Lovells.