One of the ways that corruption manifests itself in the play “Hamlet” is in the multiple instances of spying and subterfuge that grow out of the atmosphere of suspicion and fear.

Now it turns out the United States has been tapping into the cellphone of Angela Merkel, chancellor of Germany and one of our closest allies. Previously, the French and Brazilian governments had protested U.S. surveillance of their communications. Like old Polonius, we have hidden behind the curtain to listen in. Let us hope we don’t meet his fate.

The revelations of Edward Snowden have continued to highlight the overreach of the U.S. security apparatus, which has developed technology able to sift through millions of communications, including those of American citizens. When Snowden first began to release his information through the selective use of several newspapers, the public was unsure whether to be outraged by his violation of government secrecy or by the content of his revelations.

It was alarming that the government felt it had a right to spy indiscriminately on American citizens and to lie about it. But these constitutional violations did not generate a groundswell of outrage. Most people probably think they are not important enough to come to the attention of the National Security Agency and its telecommunications watchdogs. And they are probably right. Thus, for many people the violation of rights enacted by the NSA remained a mostly abstract violation. President Obama did not disavow it, though he insisted that he would put safeguards in place.

Spying on Angela Merkel is something else. It puts in stark relief the nature of surveillance. It violates the sphere of privacy that we all assume belongs to each of us.

But more than a personal violation, spying directly on allied leaders in such a personal way remains a stupidly self-defeating exercise in espionage. What kind of defense does Obama have? That everyone is doing it? That we didn’t think we would be caught? That he didn’t know it was happening?

In fact, everyone is probably doing it in some sense. We can assume the intelligence services of all the leading states, friend and foe, are using every tool at hand to acquire the information they need to secure a diplomatic and economic advantage. But as there are rules of war, there are rules of diplomacy, the violation of which sows discord among friends.

The United States needs all the friends it can get. It has several high-stakes initiatives on the table that could transform the affairs of nations. These include the burgeoning rapprochement with Iran, the effort to settle the war in Syria and the Israeli-Palestinian talks. We need to keep our allies on our side, well-informed and supportive.

Sen. Patrick Leahy, chairman of the Senate Judiciary Committee, has been critical of the Obama administration’s expansive surveillance program and has taken steps to rein it in. The latest revelations about spying on Merkel ought to give new impetus to his effort.

Remember what happened to Polonius. He had hidden behind the arras in the chamber of Hamlet’s mother in order to listen in when an angry Hamlet came to speak with her. Hamlet was compiling evidence that his mother’s new husband, the king, had murdered Hamlet’s father. As Hamlet railed against his mother, he heard Polonius behind the arras. “How now? A rat?” he said, drawing his sword. He thrust his sword through the arras, thinking he would kill the king. But when he pulled the curtain back and saw whom he had killed, he said, “Thou wretched, rash, intruding fool, farewell!”

We are the intruding fool, driven by fear of what we don’t know. Germany is not likely to draw a sword on us, but its trust in us and willingness to support us in our complex diplomatic initiatives have been compromised. The same goes for France, Brazil and, presumably, others. Maybe Snowden has done Obama a favor, providing him a justification for putting needed bounds on an out-of-control surveillance program.