Law is a system of rules that are created and enforced through social or governmental institutions to regulate behavior. It is a complex concept, with its precise definition being the subject of longstanding debate. Law can be a set of statutes passed by a legislature and promulgated by the executive branch as decrees or regulations, or it can be established by judges through case law, as in common law jurisdictions. Law may also refer to a specific branch of law, such as criminal or contract law.
The primary functions of law are to keep the peace, maintain the status quo, respect individual rights, promote social justice, and provide for orderly social change. The extent to which a legal system fulfills these goals varies from nation to nation. A state ruled by an authoritarian government, for example, may keep the peace but oppress minorities or its political opponents. In contrast, a democratic regime may encourage peaceful protests and guarantee the freedom of expression of its citizens.