In law, custom, or customary law consists of established patterns of behaviour that can be objectively verified within a particular social setting. The modern codification of civil law developed out of the customs, or coutumes of the middle ages, expressions of law that developed in particular communities and slowly collected and written down by local jurists. Such customs acquired the force of law when they became the undisputed rule by which certain entitlements (rights) or obligations were regulated between members of a community.
In international law, customary law refers to the Law of Nations or the legal norms that have developed through the customary exchanges between states over time, whether based on diplomacy or aggression. Essentially, legal obligations are believed to arise between states to carry out their affairs consistently with past accepted conduct. These customs can also change based on the acceptance or rejection by states of particular acts.
Some principles of customary law have achieved the force of peremptory norms, which cannot be violated or altered except by a norm of comparable strength. These norms are said to gain their strength from universal acceptance, such as the prohibitions against genocide and slavery.
Customary international law can be distinguished from treaty law, which consists of explicit agreements between nations to assume obligations. Many treaties, however, are attempts to codify pre-existing customary law.