神策军
In 900, there was an incident where Emperor Zhaozong, after becoming drunk, personally killed a few eunuchs and ladies in waiting. The eunuch commanders of the imperial Shence Army, Liu Jishu and Wang Zhongxian (), as well as the eunuch directors of palace communications Wang Yanfan () and Xue Qiwo (), jointly deposed him and declared his son Li Yu, Prince of De the Crown Prince the new emperor. However, in 901, the Shence Army officers Sun Dezhao (), Zhou Chenghui (), and Dong Yanbi () carried out a countercoup, killing the four top eunuchs and restoring Emperor Zhaozong to the throne. After this incident, Li Maozhen went to Chang'an to pay homage to Emperor Zhaozong. Emperor Zhaozong thereafter bestowed the titles of acting "Shangshu Ling" and "Shizhong" on him, and also created him the Prince of Qi. At the request of the chancellor Cui Yin, who was fearful that surviving eunuchs would make a comeback, Li Maozhen left 3,000 Fengxiang soldiers at Chang'an to counteract the Shence Army, which remained under the command of eunuchs Han Quanhui and Zhang Yanhong () (who was formerly the eunuch monitor of the Fengxiang army). Meanwhile, when Zhu attacked Huguo Circuit around the same time, and Wang Ke sought aid from both Li Keyong and Li Maozhen, Li Keyong was unable to save him because his path was cut off by another army of Zhu's, and Li Maozhen did not act at all. Zhu was able to force Wang Ke to surrender, adding Huguo to the territory he controlled.