''Since its birth on November 4, 1952, the singular objective of the NSA, responsible for worldwide electronic surveillance and code breaking, was to prevent a surprise attack,'' writes the leading journalistic expert on the agency, James Bamford. The effectiveness of the NSA is again in question. Its reach is shown to exceed its competence. Today the NSA is making the US a target for presidents, prime ministers, governments and populations around the world. The former NSA contractor Edward Snowden has leaked documents that illuminate details of NSA spying around the world. And each time a new country is revealed to have been an NSA target, that country lights up with indignation and anger. So far, almost all are allies or friends of America. Germany, France and Italy, all NATO allies of the US, have all complained publicly. Brazil's president cancelled a trip to the US and halted a deal to buy American aircraft. Mexico described NSA surveillance as unacceptable, illegitimate and unlawful. The latest to be affected, Spain, another NATO ally, has called the spying unacceptable. Germany's chancellor, Angela Merkel, seems to be angrier than any of the other leaders. Snowden revealed that the NSA had been listening to every phone call and reading every text from her personal mobile phone for a decade. When she rang Barack Obama to protest, a sheepish US president had to apologise and promise it would stop. In the process, the US has admitted to listening into the private communications of 35 world leaders.

The Snowden documents ''give a sense of the agency's reach and abilities, from the navy ships snapping up radio transmissions as they cruise off the coast of China, to the satellite dishes at Fort Meade in Maryland ingesting worldwide banking transactions, to the rooftops of 80 American embassies and consulates around the world,'' reports The New York Times, which has seen thousands of pages of the Snowden material. Australia's government and opposition have been silent on the NSA revelations, and for good reason. Australia is a close partner of the US intelligence agencies as part of the long-standing co-operation system known as ''five eyes'' - the US, Britain, Canada, Australia and New Zealand. Yet while the NSA's reach is ever-expanding, its effectiveness is not. It has had many successes. But, as the Times points out, the NSA has blanket coverage of Afghanistan yet the US and allies have failed to win clear-cut victory against a low-tech enemy. And its overreach is proving costly, as US allies discover the extent of its penetration. For instance, Germany's Justice Minister, Sabine Leutheusser-Schnarrenberger, says European nations should consider suspending a pact that allows the US to track flows of money through European banks through the SWIFT system. Much of the political reaction is pantomime. Every government runs spy services. The former president of Mexico Vicente Fox made the commonsense remark that ''all the citizens of all countries are spied on every day; this is today's world''.

Apart from the US and Mexico, the governments of Russia, China and India also run espionage activities, Fox pointed out, and they haven't been asked to stop. He's right. In fact, the Chinese are making the most of America's discomfort. Commentators are giving lectures to Washington about human rights and freedom. China and Russia are working on a proposal in the UN to limit intercept activities globally. Strikingly, two friends of America are doing the same - Germany and Brazil - in parallel action. America's ''technology has outrun policy,'' says the NSA's former inspector-general Joel Brenner. The US is collecting every keystroke and conversation that it can because it can. This is alienating its allies and empowering its rivals. The same syndrome applies to US use of killer drones. The US has a strained relationship with the world's most dangerous powder-keg state, Pakistan, nuclear-armed, tenuously democratic and seething with anti-Americanism. On Friday a US drone strike killed the leader of the Taliban in Pakistan, Hakimullah Mehsud. It took place in Pakistan. He is a loathsome individual who has ordered the most dreadful of terrorist acts.

But he was to sit down to peace talks with the government of Pakistan the next day. The Pakistani Interior Minister, Chaudhry Nisar Ali Khan, says the assassination ''is not just the killing of one person, it's the death of all peace efforts''. Barack Obama in his first term recruited to his White House a 29-year CIA veteran, a counterterrorism expert named Bruce Riedel. According to journalist Bob Woodward, Riedel told the president that Pakistan had to be the top priority in containing terrorism and drone strikes had to be used judiciously. ''Drone strikes are similar to going after a beehive one bee at a time,'' he said. They would not destroy the hive. Indeed, they may just destabilise the hive with dire consequences. Loading America has a surplus of technology but its current policies show a deficit of wisdom.

Peter Hartcher is the international editor.