The Shang dynasty, like the one rumored to have come before it and the ones that would come after eventually declined. Eventually it was replaced by the Zhou dynasty which was the first to introduce the idea that those in charge ruled by a mandate of heaven. This practice would be followed in all successive dynasties, with the main belief being that the ruler ruled with the blessing of heaven. If a ruler lost the blessing, natural disasters would occur, the royal family would be overthrown, and a new house would rule. This dynasty was never able to fully unify the entire territory and this gave rise to city-states.