From the outset, religion played a role in Tang politics. In his bid for power, Li Yuan had attracted a following by claiming descent from the Taoist sage Laozi (). People bidding for office would request the prayers of Buddhist monks, with successful aspirants making donations in return. Before the persecution of Buddhism in the 9th century, Buddhism and Taoism were both accepted. Religion was central in the reign of Emperor Xuanzong (). The Emperor invited Taoist and Buddhist monks and clerics to his court, exalted Laozi with grand titles, wrote commentary on Taoist scriptures, and set up a school to prepare candidates for Taoist examinations. In 726, he called upon the Indian monk Vajrabodhi (671–741) to perform tantric rites to avert a drought. In 742, he personally held the incense burner while patriarch of the Shingon school Amoghavajra (705–774) recited "mystical incantations to secure the victory of Tang forces".
From the outset, religion played a role in Tang politics. In his bid for power, Li Yuan had attracted a following by claiming descent from the Taoist sage Laozi (). People bidding for office would request the prayers of Buddhist monks, with successful aspirants making donations in return. Before the persecution of Buddhism in the 9th century, Buddhism and Taoism were both accepted. Religion was central in the reign of Emperor Xuanzong () The Emperor invited Taoist and Buddhist monks and clerics to his court, exalted Laozi with grand titles, wrote commentary on Taoist scriptures, and set up a school to prepare candidates for Taoist examinations. In 726, he called upon the Indian monk Vajrabodhi (671–741) to perform tantric rites to avert a drought. In 742, he personally held the incense burner while patriarch of the Shingon school Amoghavajra (705–774) recited "mystical incantations to secure the victory of Tang forces".