Li Yuanji sent the general Zhang Da (張達) against Liu, despite Zhang's reluctance, as Li Yuanji gave Zhang only a small army, and Liu defeated Zhang. Zhang, angry at Li Yuanji, instead surrendered to Liu and led Liu to capture Yuci (榆次, in modern Jinzhong, Shanxi).
Soon, Liu put Taiyuan under siege. Li Yuanji initially fought him off, but soon Liu captured Shi (石州, roughly modern Lüliang, Shanxi) and Jie (介州, also part of modern Jinzhong) Prefectures, and soon, Liu's general Huang Ziying (黃子英) defeated and captured the Tang generals Jiang Baoyi (姜寶誼) and Li Zhongwen (李仲文), although Jiang and Li Zhongwen soon fled from Liu's camp.