It looks like the CIA has picked another loser. And while the headlines about the case have focused on a crisis of confidence among North Atlantic allies, the real question is how the Central Intelligence Agency, or its people in Berlin, could be so incredibly dumb.

The man at the center of the sturm und drang was a spy in the offices of the German BND intelligence service. Since the news broke over the weekend, his colleagues have described him to the German press as “naïve” and “not very qualified” for what was essentially clerical work at a low-end job editing the text of incoming files.

While the name of the 31-year-old functionary who worked in the BND (Bundesnachrichtendienst) headquarters in the Pullach district of Munich has not been revealed, he is reported to have a speech impediment and to have suffered from an as yet unspecified physical impairment since childhood. The implication of some German news stories is that he was almost a charity case.

It gets weirder, and worse. This guy was not recruited by the CIA, he was a walk-in who volunteered to spy for the United States in 2012. Since then he is reported to have given about 200 documents to his CIA case officer in three meetings in Austria, where he received in return a total of €25,000 (about $34,000).

But leaks in the German press say the man wasn’t in it for the money, he was in it to boost his self-esteem. And perhaps he fantasized about himself as a character out of Ludlum or Le Carré. But he acted more like a bit player in an Austin Powers movie. On May 28, not content to be a “double agent” working for the CIA inside the BND, this wannabe Bourne offered his services as a triple agent to the Russian FSB—and got caught.

And how did he get caught?

Well, one of the things the Americans reportedly tasked Herr Wannabe to do was provide information on whatever he saw the BND learning about the American surveillance operations in Germany that were exposed by whistle-blowing spook Edward Snowden after he started drip-feeding revelations to the press last summer. The most sensational of those reports for the Germans, of course, was the news last October that the U.S. National Security Agency had tapped into the cell phone of Chancellor Angela Merkel. The indignation in Berlin was akin to the pronouncement of an American secretary of state back in 1929 when he sniffed, “Gentlemen do not read each others’ mail.” And the news about the spy in the BND has only heightened the outrage. “The Americans clearly don’t see that you don’t spy on your allies,” conservative German politician Hans-Peter Uhl told Welt am Sonntag. “They behave in Germany like a digital occupying force.”

But whatever one thinks of the Pandora’s box that Snowden popped open, and that Herr Wannabe was supposed to be checking up on, one thing is absolutely clear: intelligence agencies around the world, including the BND are complicit in the NSA’s massive, pervasive, invasive surveillance activities.

Herr Wannabe seems not to have taken that into account. When he allegedly decided to volunteer his services to Moscow he did so by email in a message sent to the Russian consulate in Munich with three BND documents attached.

The BND picked up on that pretty quickly. The email was sent from a private PC that did not belong to Herr Wannabe. OK. But he was the only person with access to those documents who was not in the Pullach offices at the time they were sent.

By June 10, German prosecutors figured they had made their case, but they waited to see what Wannabe was up to and, lo and behold, discovered he was providing his services, such as they were, to Uncle Sam.

Perhaps the German press and the sources leaking to it are playing down what might really have been damaging holes in BND security. It isn’t clear what the precise functions are of the “Foreign Affairs/Deployment Department” where Wannabe worked.

But retired senior CIA officers, asked on background what they think went wrong, are appalled at the evident lack of tradecraft.

“There is nothing more sensitive than spying on a friendly country,” one told The Daily Beast on Tuesday. It may not be true that all intelligence services do this in a real-life-version of Spy vs. Spy, but most certainly do, he said. “There’s always an interest for counterintelligence purposes. If you are penetrating a friendly foreign intelligence service the most valuable information is what they are doing to penetrate you. It’s in the nature of the business, like the intelligence equivalent of force protection in the military.” Another area of interest, of course, would be whether the friendly service with which you have such close relations has been penetrated by an unfriendly service and isn’t telling you about it.

The record of CIA-BND cooperation is indeed a close one. “The BND is a foster child of the USA,” historian Josef Foschepoth told the popular German news program Tagesschau. “The BND for the longest time has simply handed documents over. That is the core business of the German and American security services: exchanging information that serves the security of the USA and the troops stationed in Germany.”

But the relationship has had its problems in this century, most notably when German intelligence cultivated an Iraqi source known as “Curveball” prior to the American invasion in 2003. The BND passed on his bogus information about Saddam Hussein’s weapons of mass destruction, and the hawks in the Bush administration ate it up, since it seemed to confirm their wildest fantasies. But Agency veterans have long believed that if they had been able to interview Curveball first-hand and early on they would have seen, and reported, that he was a fabricator. The BND wouldn’t let them do that.

All that is ancient history, the retired CIA officer told us, and probably did not figure in the thinking of the CIA station chief in Germany who signed off on Herr Wannabe. This was just a problem of lousy vetting. And before accepting the services of any walk-in, said the officer, “the first question you have to ask yourself is why you want this person and what you think they can do for you.” In this case, from what’s known so far, no very satisfactory answers are likely to be forthcoming.