Spying on visiting foreign dignitaries is a longstanding habit not only of the British, but of many other countries as well. Most embassies in foreign capitals are designed with windowless safe rooms, on the assumption that their host country will be doing its best to monitor all their communications.

In 1985, the British government obtained injunctions attempting to gag the Guardian and Observer after they published disclosures by the renegade MI5 officer Peter Wright of wholesale British bugging. He and his colleagues had "bugged and burgled their way across London", during the cold war, he said.

He disclosed that MI5 bugged all diplomatic conferences at Lancaster House in London throughout the 1950s and 1960s, as well as the Zimbabwe independence negotiations in 1979.

MI5 were alleged to have bugged diplomats from France, Germany, Greece and Indonesia, as well as the Soviet leader Nikita Khrushchev's hotel suite during his visit to Britain in the 1950s, and to have broken into Soviet consulates abroad to spy on them.

Khrushchev's 1956 visit to Britain aboard a Soviet battleship led to a famous scandal. The spy agency MI6 hired a middle-aged ex-navy frogman, Lionel "Buster" Crabb (pictured), to inspect the battleship's advanced propeller in Portsmouth harbour. Crabb's dive went wrong, his headless body was found in a frogman suit, and the Russians gleefully made a public diplomatic protest.

Much more recently, in 2003, in a case which has distinct echoes of Edward Snowden's current decision to expose western electronic spying, a 29-year-old GCHQ translator, Katherine Gun, revealed in the Observer how the US had sought help from GCHQ under the Blair government to spy on delegates to the UN security council, to try to influence votes over the unpopular US-UK plan to invade Iraq. Her US counterparts in the NSA wanted to "give US policymakers the edge in obtaining results favourable to US goals".

"Good God, I thought, that's pretty outrageous," she later recalled. Gun was charged under the Official Secrets Act, but her Old Bailey trial was dropped at the last minute by the authorities, after she maintained her action was necessary to try to prevent an illegal war.

• This article was amended on 17 June, 2013, to give the correct name of Lionel "Buster" Crabb. An earlier version gave his name as Crabbe.