 When Li Hanzhi sought aid from Li Keyong, Zhang sought aid from Zhu Quanzhong, who repelled Li Keyong's attack; from that point on, Zhang became an ally and follower of Zhu's, while Li Hanzhi became a key general under Li Keyong.