The Huang Ho Valley civilization in northern China developed around 2000 BC. Led by the mythical ruler Yu the Great, they drained the land and founded the Xia kingdom, uniting northern China. By 1800 BC, isolated villages and farms had developed in the Huang Ho Valley, using the river for trade. The first records of Chinese civilization come from the Shang Dynasty, which came to power in 1766 BC and built the first Chinese cities. The Shang worshipped spirits and ancestors and were ruled by a king who received power from spirits and wisdom from ancestors. Religious and government authority were intertwined.