The origins of civil law can be traced back to ancient civilizations, such as ancient Mesopotamia, Egypt, Greece, and Rome. The earliest known legal code is the Code of Ur-Nammu, which was written in Sumer (located in Mesopotamia) around 2100 BCE. This code dealt with issues such as property rights, family law, and commercial law.
One of the most famous early legal codes is the Code of Hammurabi, which was written in Babylon around 1754 BCE. The Code of Hammurabi is considered to be one of the first examples of a comprehensive legal code, and it dealt with a wide range of issues, including criminal law, family law, property law, and commercial law.