A state is an organized community living under one government. States may be sovereign. The term state is also applied to federated states that are members of a federal union, which is the sovereign state. Some states are subject to external sovereignty or hegemony where ultimate sovereignty lies in another state. The state can also be used to refer to the secular branches of government within a state, often as a manner of contrasting them with churches and civilian institutions. Many human societies have been governed by states for millennia, but many have been stateless societies. The first states arose about 5,500 years ago in conjunction with rapid growth of cities, invention of writing, and codification of new forms of religion. Over time, a variety of different forms developed, employing a variety of justifications for their existence (such as divine right, the theory of the social contract, etc.). Today, however, the modern nation-state is the predominant form of state to which people are subject.