An Chonghui
In 923, Li Siyuan, a major general for Later Liang's archrival Later Tang, which was then ruled by Li Siyuan's adoptive brother Li Cunxu, captured Yun Prefecture in a surprise attack, and was subsequently commissioned by Li Cunxu as the military governor ("Jiedushi") of Tianping Circuit (天平, headquartered at Yun). Zhang Yanlang came under his command, and he had Zhang continue to serve as the material pricing adjustor. Later (after Later Tang destroyed Later Liang later in 923), when as Li Suyuan was moved to Xuanwu Circuit (宣武, headquartered at Kaifeng) (in 924) and later Chengde Circuit (成德, headquartered in modern Shijiazhuang, Hebei) (in 925), Zhang followed him to those assignments and served as the circuit treasurer. At some point, Zhang fostered his relationship with Li Siyuan's chief strategist An Chonghui by giving a daughter in marriage to An's son.