In the first Dirty Harry movie and in real life in Israel, the problem is one of preventing a crime which is happening right now or going to happen soon. In Israel, it is called “the ticking bomb” dilemma. What do you do if you know that a terrorist put a ticking bomb somewhere, which will kill several people when it explodes; or when you know that a suicide bomber is on his way and you must stop him before he explodes bringing several lives down with his own life?
In my opinion, resolution of the dilemma begins with identification of possible ways for authorities to abuse the system and harass innocent civilians. After all, the original motivation for the complicated and convoluted procedures of the court systems all around the world, and to the principle of suppression of illegally-obtained information, is to prevent framing up innocent people, who ran afoul (or otherwise are not conducive to the interests) of people in power.