Spying on allies is a waste of energy, German Chancellor Angela Merkel said when asked about two suspected U.S. spy cases. (Reuters)

The German government ordered the CIA’s top officer in Berlin to leave the country Thursday in an extraordinary escalation of a conflict between the two allies over U.S. espionage.

The move amounts to a high-profile expression of German anger over alleged CIA operations uncovered by German investigators in recent weeks, as well as continued public outrage over the exposure last year of widespread U.S. surveillance programs whose targets included Chancellor Angela Merkel.

A spokesman for the German government, Steffen Seibert, confirmed the expulsion of the CIA station chief in a statement that made clear Berlin regards U.S. espionage efforts as a breach of trust.

“The representative of the U.S. intelligence services at the Embassy of the United States of America has been requested to leave Germany,” Seibert said. Continued cooperation would require “mutual trust and openness,” Seibert added. “The Federal Government continues to be ready for this and expects the same from its closest partners.”

The decision means that the United States will be forced to withdraw an officer who oversees U.S. spying programs in Germany and serves as the main point of contact with German intelligence services, exchanging information on subjects ranging from terrorist plots to Iranian nuclear ambitions.

In ordering the CIA station chief to leave, Germany resorted to a form of retaliation that is occasionally employed by espionage adversaries such as the United States and Russia, but rarely by such a close ally.

“I can’t recall ever getting to the point where a friendly service actually ejected somebody,” said John A. Rizzo, who spent more than three decades at the CIA and served as its acting general counsel. “The Germans must feel compelled to do this for political reasons, because there are certainly ways to convey one’s displeasure without taking this kind of overt step.”

Former officials described the outgoing CIA station chief as an agency veteran, a German speaker who has held a series of overseas posts as well as assignments at headquarters in the agency’s European division.

Before ordering him out, Germany “had to make a calculation of what they were going to lose — they get a substantial amount of intelligence from us,” said a former senior U.S. intelligence official who worked closely with Berlin and spoke on the condition of anonymity because of the sensitivity of the subject. “There will be people in the [U.S.] intelligence community who will want to say, ‘That’s it.’ ”

Former U.S. officials said the agency pulled back on certain spying operations last year amid concern about the fallout from information leaked by former intelligence contractor Edward Snowden. At the same time, the former officials said, the latest arrest and raids indicate that Germany has stepped up its defenses and efforts to root out U.S. spies.

Even before the expulsion, U.S. officials said espionage-related frictions with Germany had hurt diplomatic relations with an ally that the United States has relied on for support in a number of security matters, including efforts to contain Russian aggression in Ukraine.

U.S. officials at the White House, the CIA and the U.S. Embassy in Berlin declined to comment on the expulsion or the recent German allegations of U.S. espionage.

The decision to ask the CIA station chief to leave came one day after German authorities carried out raids at an apartment and an office in Berlin as part of a reported investigation of a person with ties to the German military who is suspected of working for U.S. intelligence.

Last week, German police arrested a 31-year-old employee of the German foreign intelligence agency, the BND, who is accused of selling secrets to the CIA. Seibert said the decision to oust the CIA officer was made “against the backdrop of the ongoing investigations of the Federal Prosecutor General as well as the questions pending for months about the activities of the US intelligence services in Germany.”

The latter was a reference to leaks last year by Snowden showing that the United States was intercepting communications of Germans and citizens of other European nations on a massive scale. Documents also showed that the National Security Agency had been monitoring Merkel’s cellphone for years. The operation was halted and the Obama administration was forced to apologize.

In Berlin on Thursday, Merkel described spying on allies as “a waste of energy.”

Merkel has been criticized by some Germans for failing to respond more forcefully to the Snowden disclosures, which prompted Germany’s parliament to launch an inquiry into the NSA’s surveillance programs on German soil.

Last week’s arrest of an alleged CIA informant may have been particularly galling to German officials because the suspect is accused of selling information to the CIA on the progress of that parliamentary probe, according to reports.

Hans-Christian Ströbele, an official in Germany’s Green Party and member of the parliamentary inquiry, described the CIA expulsion as “a necessary symbolic act to show our friends on the other side of the Atlantic how serious this matter is.”

Even so, officials in both Berlin and Washington signaled a reluctance to allow frictions over espionage to damage cooperation on other fronts.

While declining to comment on “a purported intelligence matter,” Caitlin Hayden, spokeswoman for the National Security Council, said the U.S. “security and intelligence relationship with Germany is a very important one, and it keeps Germans and Americans safe. It is essential that cooperation continue in all areas, and we will continue to be in touch with the German government in appropriate channels.”

Former U.S. intelligence officials said that Germany is particularly dependent on U.S. capabilities in tracking al-Qaeda and other terrorist groups. U.S. counterterrorism officials have warned of growing danger to European countries because thousands of their citizens have traveled to Syria to fight alongside Islamist militants in that country’s civil war.

Kirchner reported from Berlin.