Such institutions as political society and government probably originated in the neolithic period with the development of agriculture. Historians argue that the first large scale government was developed in Egypt as a result of the necessity of cooperation during the process of irrigation due to the pattern of flooding of the Nile.
In general, complex political and governmental structures are found when groups of people settle together, moving from a hunter-gatherer to an agricultural society, and need to cooperate to facilitate agriculture and labor specialization. The main purpose of political structures is to facilitate cooperation and exchange, and mediate conflicts. A term often used to describe the exchange of absolute personal liberty for a reciprocal and mutual beneficially arrangement is "the social contract."