The ancient civilizations developed law codes and the idea of divine kingship based off of what they knew. Law codes, like the code of Hamurabi, were made by the rulers according to the divine belefs. We have the similar example in Islamic countries today, that are secular but also take the law of Sheriat.