During the era of Western settlement in the middle of the nineteenth century, various forms of primitive legal practices were instituted to bring order to the frontier; many formal legal codes evolved from these early precepts, including the Miner's Codes.
Originally the codes were various traditional laws that were respected throughout mining camps in the West. The codes were recorded, and their purpose was to establish guidelines for filling and determining claims and arbitrating disagreements among miners. The miner's "courts" rendered decisions in disputes, and the tenets of the codes guaranteed their enforcement.
The Gregory Diggings Code of Colorado was the best example of a functioning system based on the laws of the Miner's Code. The Gregory Code successfully produced a harmonious political and judicial system that was imitated by other mining towns. Between 1861 and 1862, the legislature of the Colorado territory formally adopted the canons of the Gregory Code.