Insurance is the oldest form of legal aleatory contract, with some forms of economic risk pooling dating back to at least the ancient Babylonian empire; the Code of Hammurabi recognized a form of insurance protecting merchants' goods transported by ship or caravan against loss by storm or theft.