legal systems vary between countries, with their differences analysed in comparative law. in civil law jurisdictions, a legislature or other central body codifies and consolidates the law. in common law systems, judges make binding case law through precedent, although on occasion case law may be overturned by a higher court or the legislature. historically, religious law influenced secular matters, and is still used in some religious communities. sharia law based on islamic principles is used as the primary legal system in several countries, including iran and saudi arabia.