There is a small silver lining to the dark cloud that hangs over U.S.-Egypt relations following the failure of the Egyptian police to prevent the storming of the U.S. embassy in Cairo last week. President Mohamed Morsi, the Freedom and Justice Party, and the Muslim Brotherhood demonstrated that they are beginning the transition from opposition to statesmanship. Such statesmanship, in turn, will be required of U.S. leaders in order to recognize the difficulty of the situation Arab governments face and to avoid further inflaming it.

To be sure, Egyptian statesmanship was not in evidence on September 11, 2012, as hundreds of protesters waving black flags and tearing the American stars and stripes to shreds breached the walls of the U.S. embassy. It took President Morsi twenty-seven hours to denounce the assault. But he and his party caught their mistake, and have hurried to make up for lost time. Morsi’s press release last Wednesday night, his somber televised address on Thursday evening, the online posting of Deputy Muslim Brotherhood Guide Khairat al-Shater’s statement of concern for the safety of the American diplomatic mission, all represent an acknowledgement by the Egyptian government and the Brotherhood that their responsibility to protect diplomatic missions is absolute, no matter the circumstances that lead to the threat.

For a new and inexperienced party, thrust quite unexpectedly into the responsibilities of government and facing its first major foreign policy crisis, this response should be seen as a glass half full, not half empty. At least the change in approach is going in the right direction. In other countries, too, signs of responsible reactions to the crisis can be seen. In Libya, for example, a demonstration was organized to protest the sacking of the U.S. consulate and the killing of the ambassador in Benghazi.

The new Egyptian government is in a difficult position. For the first time in its modern history, Egypt is now democratic enough that the government must take public opinion into consideration—a situation both President Barack Obama and his Republican challenger, Mitt Romney, should be able to identify with. The country will probably hold parliamentary elections in a few months, and anger is widespread at a deliberately provocative video, “The Innocence of Muslims.” Political opponents of the Morsi administration are already lining up to take advantage of it. Salafis and even secular politicians and members of the old regime are claiming that Morsi should have reacted strongly to the video—in other words, that he should have been ahead of the protesters.

In trying to balance domestic and foreign relations imperatives, Morsi initially put domestic political considerations ahead of statesmanship and stumbled. And he may stumble again as he tries to thread a very fine needle. Washington should be aware of his conundrum and try to help him through it.

Many governments across the Middle East and the Muslim world are facing the same dilemma as Morsi. Radical groups are deliberately fanning the flames of religious sensitivities for their own purposes, but it would be a serious mistake to disregard the genuine resentment of the United States that exists in many countries. That the reaction to the clumsy video spread so far and so quickly indicates it is giving voice to a deep-seated, underlying sentiment. Violence flared up rapidly not only across the Middle East, but even further afield, from Nigeria to Bangladesh. The situation is bound to get worse or at least to remain dangerously tense for a while.

It is the duty of Arab governments to curb the violence and protect the diplomatic missions. But it is equally incumbent on the Obama administration, as well as on Congress and the Romney campaign, to refrain from steps that will make matters worse. In doing their part to defuse tensions, they must also walk a fine line between domestic politics and international statesmanship.

The most important step is to try to bridge the gap between the United States and Arab publics and their governments on the issue of free speech. The gap is partly caused by lack of understanding of the American system in the Arab world. Most Arabs simply do not believe that the U.S. government is powerless to control the media and thus is not behind the video.

But it is also caused by the stance of some in the United States that American values require the defense of an absolute right to free speech. In reality, even in the United States, a country that boasts some of the most robust protections of free speech in the world, those safeguards are not limitless. The U.S. Constitution as currently interpreted makes a distinction between speech that is merely offensive (which is protected) and speech that is deliberately tailored to provoke violence or lawbreaking (which is not). Constitutional scholars differ as to whether the content of “The Innocence of Muslims” and the circumstances of its promotion meet the standards of intent to cause harm and the imminence of the harm that takes place. But this question of American values and law is clearly not open-and-shut, and the debate should be engaged.

While continuing to defend freedom of speech and of the press, and persisting in the long-term task of convincing Arabs that the U.S. government truly does not control the media, American statesmen might consider taking deliberate steps at home. There could well be value in finding legal remedies against speech that is not just hateful, but that is deliberately weaponized to put human lives and U.S. property—not to mention U.S. policies—at risk.

U.S. relations with the Arab and Muslim world will not improve if the United States hardens its position. Threatening Egypt with a loss of military aid, or withdrawing support for an IMF loan, will make it more difficult for the Morsi government to address the crisis on the domestic front and will only increase anger across the region. Declaring Morsi’s Egypt and its vibrant, diverse, ambitious population unfriendly will not protect the U.S. interests in continuing to play a positive leadership role in a changing world, in maintaining access to oil, or in helping assure Israel’s security.

What will help tamp down this crisis is to recognize that all sides have their provocateurs, ready to exploit opportunities for fanning extremism. It is the job of statesmen, American as well as Egyptian, to find ways, under the law, of placing some limits on the freedom to do harm that is enjoyed by extremists.