A by-law (or bye-law) is a rule or law established by an organization or community to regulate itself, as allowed or provided for by some higher authority. The higher authority, generally a legislature or some other government body, establishes the degree of control that the by-laws may exercise. By-laws may be established by entities such as a business corporation, a neighborhood association, or depending on the jurisdiction, a municipality. In the United States, bylaw is the preferred spelling.
In the United Kingdom, Canada, and some Commonwealth countries, the local laws established by municipalities are referred to as by-laws because their scope is regulated by the central governments of those nations. Accordingly, a bylaw enforcement officer is the Canadian equivalent of the American Code Enforcement Officer or Municipal Regulations Enforcement Officer. In the United States, the federal government and most state governments have no direct ability to regulate the single provisions of municipal law. As a result, terms such as code, ordinance, or regulation, if not simply law are more common.
The Oxford English Dictionary indicates that the origin of the current modern use of the word is not clear. One possibility is the earliest use of the term, which originates from the Viking town law in the Danelaw, wherein by is the Old Norse word for a larger settlement as in Whitby and Derby (compare with the modern Danish-Norwegian word by meaning town, or the modern Swedish word by, meaning village). However, it is also possible that this usage was forgotten and the word was "reinvented" in modern times through the use of the adverbial prefix by- giving the meaning of subsidiary law or side-law (as in byway). In either case, it is incorrect to claim that the origin of the word is simply the prepositional phrase "by law."