Code of Hammurabi
The Code of Hammurabi, written around 1790 BC, provides the earliest surviving known mention of suretyship in a written legal code.