A religious institution is defined by federal and state laws, which vary by state. For example, one state defines a religious organization for health insurance purposes as is defined as an entity that is set up exclusively for religious purposes and has obtained nonprofit tax status. Another state defines a religious organization as a church, synagogue, or other organization or association that is organized primarily for religious purposes.
Law, in the religious sense, also includes codes of ethics and morality which are upheld and required by God. Examples include customary Hindu law, Islamic law, and the divine law of the Mosaic code or Torah. Some governments establish state churches. In some jurisdictions, this means that they operate legal systems of their own or play a part in the legal system of those governments. Canon law is one such type of legal system; it was administered in ecclesiastical courts.
Religion and law have always been interrelated. There have been times when all laws were based on and emanated from religion. Even today various systems of laws across the globe draw their provisions, to varying degrees, from religion. In the past, religion wholly controlled the law; today law controls the scope and sphere of religion in major parts of the world. For most Americans, the relationship between law and religion is limited almost exclusively to the question of the separation of church and state.