There is considerable debate about the origins of the Vajrayana, and there is no clear point at which the tradition broke from the Mahayana (or even if it actually did). By the 7th century C.E., Vajrayana doctrines and practices were being taught in the great Indian Buddhist monasteries of northeast India.
The Vajrayana emerged out of Mahayana Buddhism, and has always been closely related to that tradition. Tantric elements from both Buddhism and Hinduism have been incorporated into the Vajrayana, as have indigenous religious practices in countries such as Tibet and Japan.
There is no single founder of the Vajrayana. Scholars speculate that the earliest followers of this path were Indian tantric practitioners, the mahasiddhis. The Vajrayana puts particular emphasis on the teachings of the 2nd-century Mahayana scholar monks Nagarjuna and Asanga.
The scriptural foundations of the Vajrayana include both the Theravada Canon and the major Mahayana Buddhist texts. The earliest explicitly Vajrayana texts are the various tantras that began to be composed in the 7th century C.E.
Although misunderstandings and misrepresentations of the Vajrayana persist, particularly regarding the sexual imagery of the tantric tradition, much scholarship has focused on the socio-political context of the Vajrayana and the deep philosophical complexity of the tradition's rituals and doctrines.