Competing regional societies developed fortified settlements, political hierarchies and ritual authority, laying the foundations for the earliest states recorded in Chinese history.