Based in Chang'an, it formed the core of the Imperial Guards, an elite military formation responsible for protecting the emperor.
During the An Lushan rebellion, 1,000 Shence Army troops under general Wei Boyu were dispatched to assist the embattled central authorities.
By the time Emperor Dezong of Tang ascended to the throne, the Shence Army had grown to 150,000 troops and was the main military power in both Chang'an and the surrounding Guanzhong Plain.
After Zhu Ci's rebellion in 784, command of the Shence Army was handed over to the court eunuchs for whom it became the emperor's primary military tool.
[1] Whilst Emperor Xizong fled to the Xichuan Circuit in modern-day Sichuan, eunuch Tian Lingzi raised a new Shence Army.