A local ordinance is a law usually found in a code of laws for a political division smaller than a state or nation, i.e., a local government such as a municipality, county, parish, prefecture, etc.
In the United States, these laws are enforced locally in addition to state law and federal law. In states such as Connecticut, legislative bodies at the local level develop city and town ordinances to govern the public.
However, because of the Double Jeopardy Clause of the Fifth Amendment to the United States Constitution, for criminal processing purposes a local ordinance is considered the same as a state law, statute or ordinance, meaning if someone is charged with an offense punishable under a local ordinance and a state law, they can be prosecuted under one or the other, but not both, and a conviction or acquittal under a local ordinance or a state law prohibits a second trial on the same offense under the other one.
In all states, (such as Virginia) a city or county may enact a local ordinance as a criminal law (or traffic offense) which covers the same crime or violation as a state law, but only if the penalty provided by the local ordinance is higher than the state statute, i.e. a local ordinance cannot be used to create a lesser penalty for a crime or traffic offense than state law. For example, if a state's law set a minimum penalty of $30 for driving faster than 25 MPH on residential streets, in such states allowing local ordinance with harsher penalties to duplicate state laws, a local jurisdiction could enact its own local ordinance on the same subject only if the penalty under the local ordinance was at least $31. A local law in such states could also provide for punishment of criminal offenses if a higher penalty was imposed, e.g. if state law punished conviction for manslaughter with 20 years in prison, for a local ordinance to be valid it would have to provide a minimum punishment of at least 20 years and one day.
In some states, local law cannot duplicate state law and some subjects are completely prohibited from being covered by local ordinance. For example, in Maryland, cities, towns and counties are expressly prohibited from passing gun control laws or other local ordinances dealing with the possession, carrying and ownership of firearms or ammunition, and state laws on the subject are exclusively controlling.