The advocates of untrammelled monitoring of communications as a weapon to deal with terrorist threats suffered reverses in America and Germany last week. Yet in France they won an important victory, while in Britain the new Cameron government seems likely to take a French path when it revives the communications data bill.

This asymmetry illustrates how confused the debate over the balance between surveillance and privacy has become in democratic countries. In France, the lower house of parliament approved by a large majority a bill giving the intelligence establishment new powers to spy on the population with almost no judicial oversight. The bill still has to go before the French Senate, but the direction of policy is clear. In the US the New York court of appeals ruled that the bulk collection of telephone metadata is unlawful, although it is delaying enforcement until Congress votes on renewal of the relevant provision in the Patriot Act. But the court fired a warning shot across the bows of politicians who want to renew it without any changes, indicating that, as it stands, “it cannot bear the weight” of the interpretation so far put upon it.

In Germany, the issue of surveillance was highlighted after it was reported that the German foreign intelligence agency had been, at US request, spying on German and foreign firms and on EU institutions, using internet data searches to do so. Chancellor Angela Merkel has found herself in an awkward political corner, partly because of her earlier protests against US intelligence operations in Germany, including the bugging of her own phone. “Spying between friends, that’s just not done,” she said at the time. But apparently it is done by Germany, including spying on one friend to do a favour to another. The cases are different, in part because the historical record in each country is different. France has undoubtedly been influenced by the shock of the Charlie Hebdo murders, as well as by the need to legitimise what its intelligence services have in practice been doing for years. The US has its own traumas of that kind, 9/11 above all. But it also has a long tradition of resisting government intrusion. As for Germany, it has its memories of pervasive Nazi and Stasi controls, and also a pride in its sovereignty with which these recent revelations will not sit well.

The differences, understandable though they are, are an indication that decisions on surveillance are driven by national politics and the need to be seen to be doing something, or not doing something, according to the demands of the hour, rather than by cool analysis. Electronic espionage and data mining only work if the targets stay in the electronic world, but the indications are that terrorists are retreating from it. The result could be too much investment in the wrong kind of intelligence, along with an infringement of privacy all too easy to exploit by actors less concerned with terror than with their own commercial or bureaucratic interests. Polls show that Europeans don’t like or want most of these developments. Governments should pay more attention to what their citizens actually desire, which is a combination of both security and privacy.