Mesopotamian governments were very effective at their intended purpose, as they organized and kept control of their populations more than most other governments in recorded history. They also created the first written laws.
Mesopotamia had independent city-states, each of which consisted of a city and the miles of farmland surrounding it. Each city-state had a temple, which received, stored and distributed food and other goods. Scribes and accountants kept written records of the temple's inventory. Each city-state had a god that was considered its ruler, so the temple had all the political power in that city-state.
Towards the middle of the third millennium, power in the city-states shifted from temples to kings. People saw the king as a representative of their city-state's god. This gave him absolute power, but he was also expected to provide order and justice.
Over time, city-states became states that covered more of Mesopotamia. These states had scribes and officials that kept track of the administrative aspects of the state.
Mesopotamian governments had effective legal systems that influenced law for later generations. Judges heard cases, and the king heard appeals. Proof of a person's guilt was necessary for a conviction. Scribes wrote laws on clay tablets or stone pillars and posted the laws in public places where every citizen could read them.