Code of Hammurabi
As an example, in the Babylonian civilisation, The Code of Hammurabi made provision for punishments to be harsher for harming a noble than a commoner.