John McCain and Lindsey Graham, both Republicans, represent Arizona and South Carolina in the U.S. Senate, respectively.

We traveled to Cairo this week to support a U.S. and international effort to help Egyptians end their political crisis. We met with leaders from the civilian government, armed forces, political parties, civil society and the Muslim Brotherhood. We returned convinced that time is quickly running out to resolve this crisis, but that there is still a chance to do so if Egyptians of goodwill come together for the sake of their country, which is the heart of the Arab world and home to a quarter of its people.

We are longtime friends of Egypt and its armed forces. We have fought as hard as anyone over many years to maintain our vital foreign assistance to Egypt. We were early supporters of the 2011 revolution and have consistently spoken up for the democratic aspirations of the Egyptian people. We were among the strongest critics of former president Mohamed Morsi’s undemocratic actions, and we sympathized with the millions of Egyptians who took to the streets last month to protest Morsi’s abuses of power. But as we said again this week in Cairo, we find it difficult to describe the circumstances of Morsi’s removal from office as anything other than a coup. Unsuccessful leaders in a democracy should leave office by losing elections.

Our main message in Cairo was simple and straightforward: Democracy is the only viable path to lasting stability, national reconciliation, sustainable economic growth and the return of investment and tourism in Egypt. And democracy means more than elections. It means democratic governance: an inclusive political process in which all Egyptians are free and able to participate, so long as they do so nonviolently; the protection of basic human rights through the rule of law and the constitution; and a state that defends and fosters a vibrant civil society.

This is the kind of democratic future that we believe most Egyptians want. But the danger now is that extremist and reactionary forces, some in the Egyptian state and some among Morsi’s supporters in the streets, want to drag the country down a dark path of violence, oppression and revenge. This is doomed to failure for both sides; it would make all of Egypt’s problems infinitely worse and ultimately threaten the national security interests of the United States and our allies.

Indeed, it is worth remembering — especially when the American mind has refocused on the real and persistent threat posed by al-Qaeda — that its leader, Ayman al-Zawahiri, is a former member of the Egyptian Muslim Brotherhood who was radicalized during the violent crackdowns and detentions of Brotherhood leaders by previous Egyptian regimes. Repeating the worst mistakes of the past now will only condemn Egypt to a future of protracted instability and stagnation, while creating a new generation of radical recruits for terrorist groups such as al-Qaeda.

We believe there are still many people of goodwill and patriotism on all sides who want a better future for Egypt. We heard much that was encouraging in our meetings, and we have urged all sides to back up their good words with constructive actions. We have urged them to do so quickly, because time is running out.

It is essential for all people and parties in Egypt to look forward, to resolve their differences peacefully through an inclusive dialogue and to make the difficult compromises and painful sacrifices that are necessary to save their country.

It is essential for Morsi’s supporters, including the Muslim Brotherhood, to accept that his actions generated massive public discontent and that he will not be reinstated as president of Egypt; that they must refrain from acts and incitement of violence; and that eventually they will need to move out of the streets and into the political process, because there is no good or effective alternative to advance their interests.

At the same time, it is essential for the civilian government and armed forces to recognize that, no matter how much they may dislike Morsi’s supporters, they are Egyptians, too, and it is neither realistic nor right to try to exclude them from the life of their nation. This means dealing with them magnanimously, not vindictively. It means setting a specific timetable to achieve the transition to democracy and enabling all Egyptians to participate in amending the constitution. It means ensuring that credible Egyptian and international organizations are able to observe the upcoming campaigns and elections. And it means releasing political prisoners, including Morsi supporters.

What happens in Egypt over the coming weeks could have a decisive impact on the future of the country, but also on the broader Middle East. At its best, Egypt has been a leader among its neighbors. We still believe Egypt can serve as a model of inclusive democracy that can inspire the region and the world, and, in this great endeavor, the United States must continue to offer its support.