Around 3200 BCE in southern Mesopotamia, Sumerian scribes began pressing wedge-shaped marks into clay tablets with a reed stylus, first to tally grain, livestock and other commodities in temple and palace storehouses. The pictographic signs gradually became the abstract syllabic script known as cuneiform, capable of recording language rather than only quantities. Comparable systems arose independently in Egypt (hieroglyphs) and later in China. Writing thus began as an accounting tool before it carried law, literature and correspondence.
Writing made record-keeping, contracts, law, taxation and administration possible at scale, supplying the bureaucratic apparatus on which the first large states and their temple-and-palace capital cities depended.