prepared the city for a siege and defended his position firmly even though many territories in Yi Province had already either been conquered or had voluntarily submitted to Liu Bei following his quick takeover of many of Liu Zhang's commanderies. He only surrendered when he heard that Liu Zhang had surrendered to Liu Bei in Chengdu (Yi Province's capital). After successfully annexing Yi Province, Liu Bei appointed Huang Quan as a Lieutenant-General (偏將軍). Xu Zhong (徐衆), who wrote a commentary on the Sanguozhi, praised Huang Quan for his loyalty towards Liu Zhang when he remonstrated him against inviting Liu Bei into Yi province and for his righteousness when he prepared his city for a siege and resisted against the invaders therefore he complimented him for having the integrity of a worthy retainer. He also commended Liu Bei for appointing Huang Quan as a general after the latter's surrender, but remarked that Liu Bei's actions were not sufficient to highlight Huang Quan's virtues and encourage the worthies to serve at their utmost– something that a benevolent man should do. He provided an example of how King Wu of the Zhou dynasty paid homage to two officials known for their loyalty to the Shang dynasty – Bi Gan and Shang Rong – after he succeeded in overthrowing the Shang dynasty. Service under Liu Bei In 215, after Zhang Lu lost to Liu Bei's rival Cao Cao at the Battle of Yangping, he escaped and took shelter in the Bazhong (巴中) region in northeastern Yi Province. At this time, Liu Bei was in conflict with Sun Quan over the Jing province yet Huang Quan cautioned Liu Bei against losing Hanzhong to Cao Cao because Hanzhong was the northern gateway into Yi Province, more precisely to the three Ba commandaries and being in this position would be like "severing the arms and thighs of the people of Shu". Liu Bei agreed with Huang Quan and quickly made peace with Wu dividing the Jing Province between West and East. Liu Bei appointed Huang Quan as an Army Protector (護軍) and led his followers towards Bazhong to receive Zhang Lu, but when they arrived there, Zhang Lu had already returned to Hanzhong and surrendered to Cao Cao. Huang Quan then urged Liu Bei to attack and take Hanzhong. Between 217 and 219, Liu Bei, acting on Huang Quan's advice, launched a campaign to seize control of