Roman law is the name for the legal system of the ancient Roman state, lasting more than a thousand years and the main source of the later civil-law tradition. In the early Roman Republic law rested on custom, interpreted by patrician priests; the Twelve Tables of 451–450 BC became Rome's first written code. As the republic expanded, to handle relations between Roman citizens and foreigners, a law of peoples (ius gentium) applicable to all free persons grew up beside the civil law (ius civile) of citizens, covering ownership, obligation and contract, and the system grew ever more refined. In the Roman Empire emperors granted leading jurists the right to give public legal opinions, and legal science flourished as never before. In the sixth century the Eastern emperor Justinian I commissioned the Code, the Digest and the Institutes, which with the Novels were later known as the Corpus Juris Civilis, the summa of Roman law. After the fall of the Western Roman Empire Roman law declined, but from the eleventh century Italian scholars studied the Corpus again and Roman law revived in Europe, deeply influencing national legislation; the French Civil Code of 1804 was modelled on it, and the civil-law tradition is therefore also called the Roman-law tradition.