Text-critical study of the earliest texts to teach haṭhayoga (c.11th-13th centuries) shows that in its first formulations it was closely associated with traditional ascetic practice and that the aim of its techniques, which were physical, was to boost the beneficial effects of celibacy (or, at least, continence). Śākta traditions dating to a similar period had developed a system of yoga in which the yogin visualised the rising of Kuṇḍalinī from the base of the spine up through a series of cakras. This Kuṇḍalinī yoga, together with some other techniques developed in a Śākta milieu, was overlaid onto the techniques of haṭhayoga in texts such as the Vivekamārtaṇḍa, Gorakṣaśataka and Haṭhapradīpikā. The haṭhayoga taught in the latter text in particular became definitive and since its composition (c. 1450) Kuṇḍalinī-based haṭhayoga has been the dominant form of haṭhayoga, and indeed yoga more broadly conceived. The co-option of haṭhayoga by a Śākta tradition is representative of both the development within Śāktism of a less exclusive, more universal yoga and of the formation of the Nāth saṃpradāya. The first gurus associated with the Nāth order, Matsyendra and Gorakṣa, were part of a non-celibate Śākta tradition which developed in the Deccan. Out of this tradition there developed the celibate order of Nāth ascetics whose influence ranged, and ranges, over all but the southeast of the subcontinent.