THE LATEST blow-up between the United States and Germany over spying suggests that the Obama administration has not been observing the president’s pithiest foreign policy maxim, “Don’t do stupid [stuff].” For a year relations with Berlin have been strained by disclosures of National Security Agency surveillance of German communications and the subsequent refusal of the Obama administration to accept Chancellor Angela Merkel’s demand for a no-spying agreement. When it was revealed last fall that Ms. Merkel’s cellphone had been monitored, President Obama rightly stopped the operation; he had previously ordered a review of foreign spying.

Yet now German investigators appear to have uncovered at least one and possibly two U.S. espionage operations in Berlin using human sources, including an employee of Germany’s intelligence agency who allegedly handed over documents in exchange for cash. Dissatisfied with Washington’s laconic response to the revelations, Ms. Merkel’s government demanded Thursday that the CIA station chief in Berlin leave the country, even as it dismissed the intelligence the agency allegedly collected — including information on a parliamentary investigation into the NSA surveillance — as “laughable.

If there was one clear lesson from the dust-up over Ms. Merkel’s cellphone, it was that such operations against allies are almost certainly not worth the damage caused when they are revealed, as they too often are. This is particularly true of Germany, where the public is sensitive about questions of spying and surveillance and where there is currently a generally pro-U.S. government whose cooperation is critical to managing the crisis in Ukraine, negotiations over Iran’s nuclear program and a prospective trans-Atlantic free-trade deal, among other matters.

We don’t yet know the details of the new cases. But judging from news reports, it appears that, in spite of the review ordered by Mr. Obama, the CIA failed to shut down low-value spying operations whose exposure was bound to inflict new damage on a critical relationship. CIA Director John Brennan may have compounded the trouble with damage-control phone calls that only convinced senior German officials that their demands for explanations were not taken seriously. It’s hard to disagree with German Finance Minister Wolfgang Schaüble, who said, “So much stupidity just makes you want to cry.”

As we have said before, there are good reasons for operations such as the NSA’s collection of Internet and phone data in Germany and other friendly countries, including defense against terrorists who plot attacks against or from European cities. For a variety of reasons, a no-spying deal with Germany is probably not practicable. That doesn’t mean that intelligence-gathering of the kind apparently revealed this week is sensible. It may compromise the more important counterterrorism work with which German intelligence agencies have quietly cooperated. The revelations fuel anti-Americanism among the German public and strengthen political leaders who would like to loosen Berlin’s ties to the United States.

German Chancellor Angela Merkel speaks during a joint news conference. (Michael Sohn/AP)

Ms. Merkel is known both for her pro-American inclinations and for her sensitivity to German public opinion, so her decision to take the extraordinary step of ordering out the CIA station chief shows just how damaging the latest spying revelations have been. Her intent seems to be to induce Mr. Obama to take seriously a matter that, in German eyes, he has brushed off. The correct response would be for him to act quickly and forcefully to repair the damage.