The Zhou Dynasty ruled China from 1046 BCE to 221 BCE and was divided into three periods. During the Western Zhou Period the Zhou replaced the Shang Dynasty but gradually lost control of the kingdom. In the Spring and Autumn Period rebel nobles fought against the king. Finally, the Warring States Period saw the nobles warring against each other as nearly 200 states broke off and fought for power.