Sources of law are the origins of laws, the binding rules that enable any state to govern its territory. 

The term "source of law" may sometimes refer to the sovereign or to the seat of power from which the law derives its validity.

Jurisprudence
The perceived authenticity of a source of law may rely on a choice of jurisprudence analysis. Tyrants such as Kim Jong-un may wield De facto power, but critics would say he does not exercise power from a de jure (or legitimate) source. After WWII it was not a valid defence at Nuremberg to say "I was only obeying orders", and the victors hanged Nazis for breaching "universal and eternal standards of right and wrong".

Over decades and centuries, principles of law have been derived from customs. The divine right of kings, natural and legal rights, human rights, civil rights, and common law are early unwritten sources of law. Canon law and other forms of religious law form the basis for law derived from religious practices and doctrines or from sacred texts; this source of law is important where there is a state religion. Historical or judicial precedent and case law can modify or even create a source of law. Legislation, rules, and regulations form the tangible source of laws which are codified and enforceable.

Sources in different legal systems
In civil law systems, the sources of law include the legal codes, such as the civil code or the criminal code, and custom; in common law systems there are also several sources that combine to form “the law”. Civil law systems often absorb ideas from the common law and vice-versa. Scotland, for instance, has a hybrid form of law, as does South Africa, whose law in an amalgam of common law, civil law and tribal law.

A state may comply with international law, it may have a written or federal constitution, or it may have regional legislature, but normally it is the central national legislature that is the ultimate source of law. While a written constitution may seem to be the prime source of law, the state legislature may amend its constitution provided certain rules are followed. International law may take precedence over national law, but international law is mainly made up of conventions and treaties that have been ratified; and anything that can be ratified may be denounced later by the national parliament. Although local authorities may feel that they have a democratic mandate to pass by-laws, the legislative power they wield has been delegated by parliament; and what parliament gives, parliament make later take away.

In England, the archetypal common law country, there is a hierarchy of sources, as follows:
 Legislation (primary and secondary)
 The case law rules of common law and equity
 Parliamentary conventions
 General customs
 Books of authority

International sources

International Treaties

Governments may sign International Conventions and Treaties; but these normally become binding only when they are ratified.  Most conventions come into force only when a stated number of signatories have ratified the final text. An international convention may be incorporated into a statute (e.g. Hague-Visby Rules in Carriage of Goods by Sea Act 1971; e.g. the Salvage Convention in the Merchant Shipping Act 1995).  The Council of Europe’s European Convention on Human Rights is enforced by the ECHR in Strasbourg.

European Community Law

The European Union is special example of international law. European nations that join the EU thereby adopt all EC Law to date (the acquis communautaire), namely: treaty provisions, regulations, directives, decisions, and precedents.  Member States become subject to “Brussels” and to the binding precedent decisions of the Court of Justice of the European Union (or CJEU) in Luxembourg. However, Brussels may only act and legislate in accordance with the EU treaties, and the CJEU's supremacy applies only in matters of EU law.

National sources

Legislation

Legislation is the prime source of law. and consists in the declaration of legal rules by a competent authority.  Legislation can have many purposes: to regulate, to authorize, to enable, to proscribe, to provide funds, to sanction, to grant, to declare or to restrict. A parliamentary legislature frames new laws, such as Acts of Parliament, and amends or repeals old laws.  The legislature may delegate law-making powers to lower bodies.  In the UK, such delegated legislation includes Statutory Instruments, Orders in Council, & Bye-laws. Delegated legislation may be open to challenge for irregularity of process; and the legislature usually has the right to withdraw delegated powers if it sees fit.

Most legislatures have their powers restricted by the nation's Constitution, and Montesquieu's theory of the separation of powers typically restricts a legislature's powers to legislation. Although the legislature has the power to legislate, it is the courts who have the power to interpret statutes, treaties and regulations. Similarly, although parliaments have the power to legislate, it is usually the executive who decides on the legislative programmed. The procedure is usually that a bill is introduced to Parliament, and after the required number of readings, committee stages and amendments, the bill gains approval and becomes an Act.

Case Law

Judicial precedent (aka: case law, or judge-made law) is based on the doctrine of stare decisive, and mostly associated with jurisdictions based on the English common law, but the concept has been adopted in part by Civil Law systems. Precedent is the accumulated principles of law derived from centuries of decisions. Judgments passed by judges in important cases are recorded and become significant source of law. When there is no legislature on a particular point which arises in changing conditions, the judges depend on their own sense of right and wrong and decide the disputes from first principles. Authoritative precedent decisions become a guide in subsequent cases of a similar nature. The dictionary of English law defines a judicial precedent as a judgment or decision of a court of law cited as an authority for deciding a similar state of fact in the same manner or on the same principle or by analogy. Another definition declares precedent to be," a decision in a court of justice cited in support of a proposition for which it is desired to contend".

Compared to other sources of law, precedent has the advantage of flexibility and adaptability, and may enable a judge to apply "justice" rather than "the law".

Equity (England only)

Equity is a source of law peculiar to England and Wales.  Equity is the case law developed by the (now defunct) Court of Chancery. Equity prevails over common law, but its application is discretionary.  Equity's main achievements are: trusts, charities, probate, & equitable remedies.  There are a number of equitable maxims, such as: “He who comes to equity must come with clean hands”.

Parliamentary Conventions (UK mainly)

(not to be confused with International Conventions)	

Parliamentary Conventions are not strict rules of law, but their breach may lead to breach of law.  They typically are found within the English legal system, and they help compensate for the UK's lack of a single written constitution. Typically, parliamentary conventions govern relationships, such as that between the House of Lords and the House of Commons; between the monarch and Parliament; and between Britain and its colonies. For instance, after the Finance Act 1909, the House of Lords lost its power to obstruct the passage of bills, and now may only delay them.  The prerogative powers are subject to convention, and in 2010, the monarch's power to dissolve Parliament was abolished. Britain's tradition with its colonies is that they are self-governing (although, historically, rarely with universal suffrage), and that the mother-country should stay aloof.
		
Customs (England & Commonwealth Nations)

A "General Custom" as a source of law is not normally written, but if a practice can be shown to have existed for a very long time, such as "since time immemorial' (1189 AD), it becomes a source of law.

A "Particular Custom" (or "private custom") may arise and become a right with the force of law when a person, or a group of persons has from long usage obtained a recognized usage, such as an easement.

Books of Authority (England mainly)

Up until the 20th century, English judges felt able to examine certain "books of authority" for guidance, and both Coke and Blackstone were frequently cited.  This old practice of citing only authors who are dead has gone; nowadays notable legal authors may be cited, even if they are still alive.

See also
 Jurisprudence
 Legitimacy
 Legal socialization
Opinio juris sive necessitatis
 Sources of international law

References

Notes