is the system of practices, and organizations, used by national and local governments, directed at maintaining social control
and controlling crime, and sanctioning those who violate laws
with criminal penalties and rehabilitation. The primary agencies charged with these responsibilities are law enforcement
(police and prosecutors), courts
, defense attorneys and local jails and prisons which administer the procedures for arrest, charging, adjudication and punishment of those found guilty. When processing the accused through the criminal justice system, government must keep within the framework of laws that protect individual rights
. The pursuit of criminal justice is, like all forms of "justice
", "fairness" or "process", essentially the pursuit of an ideal
. Throughout history, criminal justice has taken on many different forms which often reflect the cultural mores of society.