Answer
Liu Bei initially joined Liu Zhang, the governor of Yi Province, to fight against Zhang Lu, a warlord who controlled Hanzhong Commandery. Liu Bei and Liu Zhang formed an alliance, with Liu Bei providing military support to Liu Zhang in exchange for land and resources. However, their alliance soon fell apart due to conflicts between their forces, and Liu Bei eventually conquered Yi Province and established his own kingdom there.