The cuneiform script proper emerges out of pictographic proto-writing in the later 4th millennium BCE. Mesopotamia's "proto-literate" period spans the 35th to 32nd centuries BCE. The first documents unequivocally written in the Sumerian language date to the 31st century BCE, found at Jemdet Nasr.
The Sumerians of the Uruk period used clay tokens to count their agricultural and manufactured foods. They would place the tokens in hollow clay containers and mark the lids with the number of tokens inside. They impressed a picture of the token inside as many times as the amount of tokens. Later they realized that they did not have to use both the tokens and the scripture on the containers, so they started using only the scripture. For example, to avoid making 100 pictures to represent 100 tokens they started making symbols for 100 tokens. Thus writing began.
Originally, pictograms were either drawn on clay tablets in vertical columns with a pen made from a sharpened reed stylus, or incised in stone. This early style lacked the characteristic wedge shape of the strokes.
From about 2900 BCE, many pictographs began to lose their original function, and a given sign could have various meanings depending on context. The sign inventory was reduced from some 1,500 signs to some 600 signs, and writing became increasingly phonological. Determinative signs were re-introduced to avoid ambiguity.
In the mid-3rd millennium BCE, writing direction was changed to left to right in horizontal rows (rotating all of the pictograms 90° counter-clockwise in the process), and a new wedge-tipped stylus was used which was pushed into the clay, producing wedge-shaped ("cuneiform") signs; these two developments made writing quicker and easier. By adjusting the relative position of the tablet to the stylus, the writer could use a single tool to make a variety of impressions.
Cuneiform tablets could be fired in kilns to provide a permanent record, or they could be recycled if permanence was not needed. Many of the clay tablets found by archaeologists were preserved, because they were fired when attacking armies burned the buildings in which they were kept. The script was also widely used on commemorative stelae and carved reliefs to record the achievements of the ruler in whose honour the monument had been erected.
The spoken language consisted of many similar sounds, and in the beginning the words were described in writing by the same symbol. After the Semites conquered Southern Mesopotamia, most likely to make things clearer in writing, some signs gradually changed from being pictograms to syllabograms. To be more accurate they started adding to signs or combining two signs to define the meaning.
As time went by, cuneiform became very complex and the difference between a pictogram and syllabogram became vague. Several symbols were too overloaded to be clear. Therefore, symbols were put together to define the writing in a better way and to give a hint on the meaning of the symbol (word). The written part of the Sumerian language was used as a learned written language until the 1st century CE. The spoken language died out around the 18th century BCE.
The archaic cuneiform script was adopted by the Akkadians from c. 2500 BCE, and by 2000 BCE it had evolved into Old Assyrian cuneiform, with many modifications to Sumerian orthography. The Semitic equivalents for many signs became distorted or abbreviated to form new "phonetic" values, because the syllabic nature of the script as refined by the Sumerians was unintuitive to Semitic speakers.
"Typical" signs usually have five to ten wedges, while complex ligatures can consist of 20 or more (although it is not always clear if a ligature should be considered a single sign or two collated but still distinct signs).
Most later adaptations of Sumerian cuneiform preserved at least some aspects of the Sumerian script. Written Akkadian included phonetic symbols from the Sumerian syllabary together with logograms that were read as whole words. Many signs in the script were polyvalent, having both a syllabic and logographic meaning. The complexity of the system bears a resemblance to old Japanese, written in a Chinese-derived script, where some of these Sinograms were used as logograms, and others as phonetic characters.
This "mixed" method of writing continued through the end of the Babylonian and Assyrian empires, although there were periods when "purism" was in fashion, and there was a more marked tendency to spell out the words laboriously, in preference to using signs with a phonetic complement. Yet even in those days, the Babylonian syllabary remained a mixture of logographic and phonemic writing.
Hittite cuneiform is an adaptation of the Old Assyrian cuneiform of c. 1800 BCE to the Hittite language. When the cuneiform script was adapted to writing Hittite, a layer of Akkadian logographic spellings was added to the script, with the result that we no longer know the pronunciations of many Hittite words conventionally written by logograms.
In the Iron Age (c. 10th to 6th c. BCE), Assyrian cuneiform was further simplified. From the 6th century BCE, the Assyrian language was marginalized by Aramaic, written in the Aramaean alphabet, but Neo-Assyrian cuneiform remained in use in literary tradition well into Parthian times ( 250 BCE - 226 CE ). The last known cuneiform inscription, an astronomical text, was written in 75 CE.