One of the worst episodes of genocide in modern history happened under the Khmer Rouge in Cambodia (1975-1979). Tens of thousands of innocent people were "processed" (ie: tortured in indescribable ways, forced to write "confessions", then executed) in a secret facility dubbed
S-21.
In essence, the logic was simply that if they caught simply a handful of spies amongst the masses, it was enough to justify the deaths of thousands of innocents in order to preserve the security of the Angkor (central organization), led by Pol Pot. All of this happened largely out of the eyes of the world, behind the curtains in one of the most brutal totalitarian regimes modern society has known.
A similiar sort of absolute "means justify the ends" logic is currently at work in Bush's "War on Terror". Read this article from the New Yorker, the magazine that recently broke the news on Abu Ghraib, as well as "a priori" pre-emptive planning for Iraq.
http://www.newyorker.com/fact/content/?050214fa_fact6