Trisong Detsen
One of the earliest chronicle sources for Padmasambhava as a historical figure is the "Testament of Ba" ("Dba’ bzhed", c. 9th–12th centuries), which records the founding of Samye Monastery under the reign of king Trisong Detsen (r. 755–797/804). Other early manuscripts from Dunhuang also mention a tantric master associated with kilaya rituals named Padmasambhava who tames demons, though they do not associate this figure with Trisong Detsen.