See also: The Religious Foundations of Western Law
https://scholarship.law.edu/cgi/viewcontent.cgi?article=2541&context=lawreview
https://en.wikipedia.org/wiki/List_of_ancient_legal_codes
4000 years ago. And the religion was in the Middle East and it wasn’t Christianity, nor Judaism either. For reference if Mosaic law (e.g. the 10 Commandments, etc.) actually came from Moses then that would have been about 1300BC (3300 years ago).