Lex specialis, in legal theory and practice, is a doctrine relating to the interpretation of laws, and can apply in both domestic and international law contexts. The doctrine states that where two laws govern the same factual situation, a law governing a specific subject matter (lex specialis) overrides a law which only governs general matters (lex generalis). The situation ordinarily arises with regard to the construction of earlier-enacted specific legislation when more general legislation is later passed. However, in this situation, the doctrine "lex posterior derogat legi priori" may also apply - the younger law overrides the older law. It can be assumed that the legislators planned to override the previous legislation. There is also a view that conflicts of norms should be avoided through a systematic interpretation. This principle also applies to construction of a body of law or single piece of legislation that contains both specific and general provisions.
The name comes from the full statement of the doctrine (a legal maxim) in Latin: Lex specialis derogat legi generali.