The Shang Dynasty ruled China from around 1600 BC to 1000 BC. They took over control of China from over 1800 smaller city-states and divided the government into provinces controlled by loyal governors. Society was strictly hierarchical, with the king and nobles at the top, followed by officials, artisans, farmers, and slaves. The Shang built walled cities and developed advanced skills in bronze-working, silk production, astrology, and a system of writing carved on bones and shells.