Preemption is a doctrine of state law that holds that a state law supersedes a local law or regulation that is in the same field and is in conflict or inconsistent with the state law. For example, if a state legislature enacts gun control legislation and the intent of the legislation is to occupy the field of gun control, then a municipality is preempted from enacting its own gun control ordinance. In some cases, state preemption may be partial, allowing local municipalities the ability to create ordinances for some aspects of a regulation. For instance, the state may preempt the regulation, licensing, possession and registration of handguns while allowing local municipalities to regulate the sale and purchase of firearms (Illinois).