it is not known when zhang guangfu was born, but it is known that he was from the tang capital chang'an. he was said to be intelligent and good at rhetoric in his youth, and also capable as an official. he was eventually promoted to the posts of deputy minister of agriculture (司農少卿, "sinong shaoqing") and then "wenchang zuo cheng" (文昌左丞), one of the secretaries general of the executive bureau of government (文昌臺, "wenchang tai"). in 687, he was made "fengge shilang" (鳳閣侍郎), the deputy head of the legislative bureau of government (鳳閣, "fengge"), and given the designation "tong fengge luantai pinzhangshi" (同鳳閣鸞臺平章事), making him a chancellor "de facto". in 688, when emperor ruizong's uncle li zhen the prince of yue rebelled against the rule of emperor ruizong's powerful mother and regent empress dowager wu (later known as wu zetian), empress dowager wu commissioned zhang to command the troops against li zhen, assisted by fellow chancellor cen changqian and qu chongyu (麴崇裕). li zhen was quickly defeated. thereafter, empress dowager wu gave him the greater chancellor designation of "tong fengge luantai sanpin" (同鳳閣鸞臺三品). (it was said, however, that zhang's soldiers, without any discouragement from him, pillaged the people of yu prefecture (豫州, roughly modern zhumadian, henan), and that zhang further demanded all kinds of supplies from the new prefect of yu prefecture, di renjie, leading to an intense argument between zhang and di in which di stated that if he had the authority to do so, he would have beheaded zhang on the spot, even if it meant his own death.)