The use of cylinder seals developed alongside that of the cuneiform writing system, invented in Mesopotamia near the end of the 4th millennium B.C.E.; prior to this, stamp seals (designed to be pressed onto clay or other media, rather than rolled) had served similar purposes.