Law Enforcement's Role in Combating and Preparing for Domestic Terrorism

How do we protect our homeland when it comes to National Security versus Criminal Justice? What role does each play and how do they interact if they do or should?