The Egyptian crackdown on American democracy-promotion NGOs and the U.S. response threatening to cut off military aid to Egypt have created a major crisis in bilateral relations that is detrimental to both countries. The two sides need to stop provoking each other and focus instead on how they can de-escalate the crisis and restore normal relations because much is at stake. This will take some skillful diplomacy and willingness to compromise.

Egypt is important to the United States. It is the largest country in the Middle East, although it is not as influential as it once was, and Egypt has signed a peace treaty with Israel which of course is something the United States wants to be preserved. True, the peace between Israel and Egypt has always been a very cold peace, and the situation is not likely to improve anytime soon. But still, a cold peace is better than no peace at all.

And Egypt, despite its hyper nationalistic sensitivity and the posturing it leads to, needs the United States. This is not just for the direct aid the United States provides, but also because Washington can influence IMF decisions on whether or not to grant Egypt the support it so desperately needs in this period of economic decline and plummeting foreign exchange reserves.

The crisis in U.S.-Egypt relations was precipitated by Egyptian outrage over the fact that American democracy-promotion NGOs brazenly operated in Egypt although they were not officially registered—the major culprits were NDI, IRI, Freedom House, and the International Center for Journalists. Adding insult to injury in Egyptian eyes, these NGOs were being funded by U.S. money earmarked for economic aid to Egypt, money that, according to an agreement between the two countries, could only go to NGOs licensed by the Egyptian government. While questions can be raised why the United States agreed to allow the Egyptian government to choose who could receive U.S. aid, this deal was in place.

From Egypt’s point of view, the United States suddenly changed the rules of the game that had been in place for years when it started disbursing large amounts of economic aid to the American NGOs after the overthrow of Mubarak. Precise figures are elusive, but $50 million appears to be a fair estimate. From the U.S. point of view, it was Egypt that changed the rules of the game, abruptly closing down organizations it had tacitly allowed to operate without permission.

The issue quickly escalated out of control, provoking strident declarations on both sides. Egypt shrouds itself in the mantle of violated sovereignty, while the United States appears inclined to turn the ability of U.S. democracy-promotion NGOs to operate in Egypt into the litmus test for assessing the progress toward democracy that would allow military aid to be released.

Paradoxically, the organizations in the eye of the storm have at best only a marginal impact on whether Egypt ultimately becomes a democratic country. Egypt’s successful parliamentary elections owe very little, if anything, to the presence of American NGOs.

Steps must be taken by both sides, and urgently, to stop a deterioration in relations that serves nobody’s interests. If the United States cannot mend its relations with the military, it will find itself quite isolated and with few friends in Egypt. The new parliament is controlled by the Muslim Brotherhood, with whom Washington is just beginning to become acquainted, and by Salafis who are outright hostile to the United States. The secular parties that the United States feels more comfortable with are fragmented and enjoy little support, as election results clearly show.

The military will not be directly running the country much longer—presidential elections are now scheduled for May—but it will remain a powerful player. And Egypt still needs the United States. With this in mind, both sides must moderate their present positions and seek a compromise.

The case of the NGOs is now in front of the Egyptian courts and as difficult as it may sound the United States should not ask the military to intervene in the affairs of the judiciary and dismiss the case—independence of the judiciary is one of the democratic tenets the United States preaches. It’s also premature for Washington to end military aid. But, the United States should demand that the case be expedited as much as possible.

The Egyptian government for its part needs to tone down its rhetoric, stop fanning the conspiratorial views circulating in Cairo of what the American NGOs were doing—the organizations were not planning a colonial style partition of Egypt—and try the suspects on the basis of the narrowest, best-defined violations of the law such as working on tourist visas. And Egypt should consider whether all of the accused need to remain in the country until the trial is over.

Above all else, both sides must keep in mind that the future of bilateral relations is much more important than the future of U.S. NGOs in Egypt.