In ancient Babylonia, if a poorly-built house collapsed on the owner, killing him, the architect was executed.

Babylonia was an ancient Semitic, Akkadian-speaking nation in central-southern Mesopotamia (present-day Iraq), with Babylon as its capital. In ancient Babylonia, if a poorly-built house collapsed on the owner, killing him, the architect was executed. If owner’s son was killed in the house collapse, the architect’s son was put to death. If the homeowner’s wife or daughter was killed, the architect was merely fined.

Source

Img source