In late 208 BC the rebel king of
Chu,
King Huai II, promised that whoever invaded Guanzhong first would rule the region. In late 207 the Chu rebel
Liu Bang became the first anti-Qin rebel to enter the Guanzhong region, capturing the Qin capital
Xianyang and receiving the surrender of
Ziying, the last king of Qin. He also won the support of the people of Guanzhong by abolishing the harsh Qin laws and by forbidding his troops from killing and robbing the locals. For these reasons, Liu Bang had a strong claim to Guanzhong, which was grain-rich, populous, easily defensible and ideal for expansion into China's
Central Plain. However, the Chu rebel
Xiang Yu, the most powerful rebel warlord at the time and Liu Bang's rival, ignored Huai's promise, and in January 206 he instead gave Liu the former Qin territories of Hanzhong, Ba and Shu in present-day
Sichuan, which he would rule as the king of
Han. Ba and Shu were grain-rich, but they were remote from the rest of China. Xiang Yu allowed Liu Bang to take only 30,000 soldiers to go with him to Hanzhong, although 10,000 further men from Chu and other states voluntarily joined his army. Liu Bang's army marched south across the
Qinling Mountains, following the Ziwu Road to Hanzhong. After reaching the
Han River Basin in Hanzhong, Liu Bang, on the advice of his advisor
Zhang Liang, burned the wooden gallery road to prove his commitment to follow Xiang Yu's orders and remain within his own dominion. Xiang Yu wished to rule his Chu homeland rather than Guanzhong, and so he divided the region between three former Qin generals who had surrendered to Xiang Yu after the Battle of Yushui River back in July 207. The former General-in-Chief of Qin,
Zhang Han, received the kingdom of Yong (), occupying present-day central Shaanxi. Xiang Yu's intention to use Zhang Han was partly influenced by the latter's exceptional successes as a general. In 209 Zhang Han had trained an army of convicts to fight the rebels, saved Xianyang and Xingyang and annihilated the rebel armies of Zhou Wen,
Wu Guang and the overall rebel leader
Chen Sheng (the King of "Rising Chu"). In 208 he defeated and killed the new overall rebel leader
Xiang Liang (Xiang Yu's uncle) and also defeated
Tian Dan, Zhou Shi, Wei Jiu,
Tian Rong and Chen Yu. In 207 he surrendered to Xiang Yu after discovering that the Qin Prime Minister
Zhao Gao intended to have him executed and then suffering defeat at Yushui River, but Xiang Yu's army had been struggling as well due to food shortages, and Zhang Han had halted the Xiang's advance between the rebel victory at
Julu in January 207 and Zhang's own surrender in July. Xiang Yu thus recognized Zhang Han's talent and tasked him with defending the passes of the Qinling Mountains should Liu Bang attempt to re-cross north into Guanzhong from Hanzhong to the south. Xiang Yu also rewarded Zhang Han's former subordinates
Sima Xin and
Dong Yi. Sima Xin received the State of Sai (), occupying present-day northeastern Shaanxi, and Dong Yi received Zhai (), occupying present-day northern Shaanxi. These three kingdoms came to be collectively known as the Three Qins, since they occupied the heartland of the former
Qin state. == Liu Bang's Decision to Invade ==