Starting in 206 BC, after Liu Bang's forces conquered the Three Qins, Liu Bang and Xiang Yu engaged in a four-year-long power struggle for supremacy over China, historically known as the Chu–Han Contention. In 205 BC, Liu Bang was defeated by Xiang Yu at the Battle of Pengcheng and he retreated to Xiayi. Zhang Liang proposed a strategy to Liu Bang to counter Xiang Yu, known as the "Xiayi Plan" (). Liu Bang followed Zhang Liang's advice: he sent Xiao He to persuade Ying Bu to join him; contacted Peng Yue and allied with him; and allowed Han Xin to lead part of his army to attack other territories on the northern front.