The German government and the conservative opposition agreed Wednesday on a draft law on wiretapping which police say is crucial to the fight against terrorists and other extremists.
State surveillence is a hotly contested issue
The bill had been fiercely debated over the limits of state surveillance and which crimes should qualify.
The agreement hammered out with the opposition Christian Union parties, which hold a majority in the Bundesrat or upper house of parliament, now allows wiretapping against suspected ringleaders of criminal rackets and in cases of sex crimes committed by a group.
But it requires the explicit approval of a judge and prohibits bugging conversations with people such as lawyers, tax advisors, doctors and journalists except in cases when a terrorist attack is believed to be pending.
Civil rights under threat
Germany's highest court last year overturned an existing law on the grounds that it failed to protect civil rights sufficiently.
The issue had been highly controversial in part due to the gross abuses of state surveillance under the Nazis and the East German Stasi secret police.
Both sides were under pressure to appear tough on crime ahead of a likely national election in September.
Police groups welcomed the agreement. "It is a relief to know that on a key question on Germany's security, reason prevailed over partisan tactics," the head of the police union GdP, Konrad Freiberg, said.
The liberal Free Democrats, however, argued that the draft law violated freedom of speech and was unconstitutional.
The bill is expected to pass the Bundestag lower house of parliament Thursday and the Bundesrat, which represents Germany's 16 federal states, on Friday.