The Kanun or formally the Kanuni i Lekë Dukagjinit (English: The Code of Lekë Dukagjini) is a set of laws developed by Lekë Dukagjini and used mostly in northern Albania and Kosovo from the 15th century until the 20th century and revived recently after the fall of the communist regime in the early 1990s.

This set of laws was customary, passed down through generations, and not codified and written down until the 19th century by Shtjefën Gjeçov. Although Kanuni is attributed to the Albanian prince Lekë Dukagjini, the rules evolved over time as a way to bring laws and rules to these lands. The code was divided into several sections: Church, Family, Marriage, House, Livestock and Property, Work, Transfer of Property, Spoken Word, Honor, Damages, Law Regarding Crimes, Judicial Law, and Exemptions and Exceptions.

Some of the most infamous rules specified how the murder was supposed to be handled, and it often led to blood feuds that lasted until all the men of the two involved families were killed. In some parts of the country, the Kanun resembles the Italian vendetta. These rules have recently resurfaced in northern Albania since people have no faith in the powerless local government and police. There are organizations that try to mediate between feuding families and try to get them to “pardon the blood” (Albanian: me e fal gjakun), but often the only resort is for men of age to stay in their homes, which are considered a safe refuge by the Kanuni, or flee the country. The Albanian name for blood feud is Gjakmarrja.

The specified gender roles sometimes led to women pledging virginity and living their life as a man, allowing them to take on male responsibilities and rights.

Prime Minister Enver Hoxha tried to stop the practice of Kanun. After the fall of communism, some communities have tried to rediscover the old traditions, but some of their parts have been lost, leading to fears of misinterpretation.

Notably, the current Albanian Penal Code does not contain any provisions from the Kanun that deal with blood feuds, and no acknowledgment of this code is made in the contemporary Albanian legal system.