Germany said Friday it had cancelled surveillance accords dating from the late 1960s with the United States and Britain in the wake of revelations about vast US online spying.
Foreign Minister Guido Westerwelle said the move was "necessary and proper" amid the debate on data privacy protection sparked by the snooping scandal which also ignited uproar in Germany.
Chancellor Angela Merkel raised the issue with US President Barack Obama on his June visit and has come under pressure in the run-up to September elections over Germany's knowledge of it.
Since then the government has announced a probe into ties between its secret services and US agencies whose sweeping online surveillance was revealed by fugitive intelligence analyst Edward Snowden.
Merkel has stressed that Germany "is not a surveillance state" and that "German law applies on German soil" but also conceded that this has its limits in the age of global telecommunication systems.
The foreign ministry statement said the surveillance deal -- a kind of exemption regarding German telecommunications secrecy -- from 1968-1969 with Washington and Britain had been annulled in "joint agreement".
According to media reports, it allowed the former Allies to request surveillance data from Germany's intelligence services when it related to the safety of their troops stationed in Germany.
"The annulment of the administrative agreements, which we have pushed for in recent weeks, is a necessary and proper consequence from the recent debate on privacy protection," Westerwelle said in the statement.
The government had stressed that the accord was effectively of no significance and no longer applied.
Germans are especially sensitive to the issue of state surveillance amid memories of Nazism and the East German communist regime.
Britain, the United States and France stationed troops in western Germany after World War II and it was an important base for the NATO allies during the Cold War.