Rock carvings have been found in many parts of Ladakh, showing that the area has been inhabited from the Neolithic times. Ladakh's earliest inhabitants consisted of a mixed Indo-Aryan population of Mons and Dards, who find mention in the works of Herodotus, Nearchus, Megasthenes, Pliny, Ptolemy and the geographical lists of the Puranas. Around the 1st century, Ladakh was a part of the Kushana empire. Buddhism came to western Ladakh via Kashmir in the 2nd century when much of eastern Ladakh and western Tibet was still practising the Bon religion. The 7th century Buddhist traveler Hsuan-tsang also describes the region in his accounts.
In the 8th century, Ladakh was involved in the clash between Tibetan expansion pressing from the East and Chinese influence exerted from Central Asia through the passes, and suzerainty over Ladakh frequently changed hands between China and Tibet. In 842 Nyima-Gon, a Tibetan royal representative annexed Ladakh for himself after the break-up of the Tibetan empire, and founded a separate Ladakh dynasty. During this period Ladakh underwent Tibetanization resulting in a predominantly Tibetan population. The dynasty spearheaded the "Second Spreading of Buddhism" importing religious ideas from north-west India, particularly from Kashmir.
Faced with the Islamic conquest of South Asia in the 13th century, Ladakh chose to seek and accept guidance in religious matters from Tibet. For nearly two centuries, till about 1600, Ladakh was subject to raids and invasions from neighbouring Muslim states, which led to weakening and fracturing of Ladakh and partial conversion of Ladakhis to Islam.
King Bhagan reunited and strengthened Ladakh and founded the Namgyal dynasty which survives even today. The Namgyals repelled most Central Asian raiders and temporarily extended the kingdom as far as Nepal in the face of concerted attempts to convert the region to Islam and destroy Buddhist artifacts. In the early 17th century efforts were made to restore destroyed artifacts and gompas and the kingdom expanded into Zanskar and Spiti. Ladakh was however, defeated by the Mughals who had already annexed Kashmir and Baltistan but it regained its independence.