It's not the judges' job to define what is in the countries best interests, it's the government's job. What he should have done was his job, which was to judge whether a law was broken or not, the government the decides whether there were mitigating circumstances in case of security.
The only way I can see this happening is if the judge was told to drop the case. Either that or I'd be very concened about the abilities of that judge to deliver judgements of law.
Either way, torture is torture in my books, and it is an evil thing to do regardless of who is doing it or why. You cannot torture someone in order to get your hands on people who use violence and fear, because, through your methods, you have just become those very same people.