The Yellow River, also known as Huanghe, is the second-longest river in China and the sixth-longest river system on Earth, with an estimated length of 5,464 km (3,395 mi) and a drainage basin of 795,000 km (307,000 sq mi). Beginning in the Bayan Har Mountains, the river flows generally eastwards before entering the 1,500 km (930 mi) long Ordos Loop, which runs northeast at Gansu through the Ordos Plateau and turns east in Inner Mongolia. The river then turns sharply southwards to form the border between Shanxi and Shaanxi, turns eastwards at its confluence with the Wei River, and flows across the North China Plain before emptying into the Bohai Sea. The river is named for the yellow color of its water, which comes from the large amount of sediment discharged into the water as the river flows through the Loess Plateau.
The Yellow River basin was the birthplace of ancient Chinese civilization. According to traditional Chinese historiography, the Xia dynasty originated on its banks around 2100 BC; Sima Qian's Shiji (c. 91 BC) record that the Xia were founded after the tribes around the Yellow River united to combat the frequent floods in the area. The river has provided fertile soil for agriculture, but since then has flooded and changed course frequently, with one estimate counting 1,593 floods in the 2,540 years between 595 BC and 1946 AD. As such, the Yellow River has been considered a blessing and a curse throughout history, and has been nicknamed both "China's Pride" and "China's Sorrow".