Kashmir has been one of the most important centres for the spread and development of Buddhism. Buddhism was an important part of the classical Kashmiri culture, as is reflected in the Nilamata Purana and the Kalhana's Rajatarangini. Buddhism is generally believed to have become dominant in Kashmir in the time of Emperor Ashoka, although it was widespread there long before his time. It enjoyed the patronage not only of the Buddhist rulers but of Hindu and early Muslim rulers too. From Kashmir, it spread to the neighbouring Ladakh.
The first known ruler of Kashmir, Gonanda (mentioned by Kalhana in his Rajatarangini), was related to Jarasandha, who ruled Magadha during the time of the Kurukshetra war. Surrendra is perhaps the first Buddhist ruler of Kashmir. He erected the first viharas in Kashmir. One of these, known as Narendrabhavana, was in the city of Sauraka (Suru, beyond the Zoji La.) The other vihara was at Saurasa, corresponding to the village Sowur on the shore of Anchar Lake to the north of Srinagar.
Kalhana claims that though it was situated far from the Mauryan capital (Pataliputra), Kashmir enjoyed all the benefits of Ashoka's benign rule. The provincial capital Shrinagari (Srinagar) was 'resplendent with prosperity and wealth.' According to some Buddhist writers including Taranatha, the Buddhist preacher Madhyantika introduced saffron cultivation into Kashmir. Buddhism and Shaivism flourished side by side in Kashmir during Ashoka's time and received the Emperor's patronage in equal measure. Kalhana notes that Ashoka built two Shiva temples at Vijayeshvara (Bijbihara), and ordered several others renovated. In Vitastatra (Vethavutur) and at Shuskaletra (Hukhalitar) he built a number of viharas and stupas. He deputed Madhyantika for the propagation of Buddhism in Kashmir and Gandhara.
Buddhism suffered a temporary eclipse during the reign of Ashoka's successors Jalauka and Damodara. Kalhana, a Hindu historian, asserted that large number of Buddhist scholars were vanquished in debates with Jalauka's guru Avadhuta, and hence traditional observances were slowly revived. Later, however, Jalauka created a big vihara, the Krityashramavihara, in the vicinity of Varahamula (Baramulla), which was still existing as late as the 11th century. The history of Kashmir after Damodara is not certain until the time of the Kushanas.
The Kushana period saw a great resurgence of Buddhism in Kashmir, especially during the reign of Kanishka. The fourth Buddhist Council was held in Kashmir, under the presidency of Katyayaniputra, in Kanishka's time. The south Indian Buddhist philosopher Nagarjuna lived in Kashmir during the Kushana period.
During the reign of Abhimanyu, which in Kalhana's chronicle follows that of Kanishka, Buddhist scholars under the guidance of Nagarjuna defeated the Shaivite clergy in debates, encouraging people to choose Buddhism. However, during the time of Chandradeva, revival of knowledge of the works of Patanjali, like the Mahabhashya which had become rare, led to a resurgence of Shaivism. By the time of Gonanda, the old philosophy was completely revived. Nothing is known about the religious affiliations of Pratapaditya, a scion of the Gupta dynasty and his successors, except that they are stated to have ruled well, and fullest liberty of faith was accorded. Buddhism is stated by Kalhana and Hiuen Tsang to have suffered severe setbacks under the Huns, especially under Mihirakula, whom Hiuen Tsang describes as a great persecutor of the Buddhists.
Upon Mihirakula's death, Kashmir was ruled by Meghavahana, who belonged to the old ruling dynasty of Kashmir. Meghavahana was a staunch Buddhist, who issued a proclamation against killing of all animals at the very time of his coronation, and built numerous stupas.
In Kalhana's time, and before, there was apparently no distinction between "Hindus" and Buddhists in Kashmir. Kalhana himself used Buddhist terms and expressions as a Buddhist would.
Nilamata Purana was the text of the worshippers of Nila Naga, the Naga worship was common in Kashmir. It mentions the prevalence of Buddhist worship as a common practice in Kashmir.
Here are some quotes from Nilamat Purana from Kashmir (trans. by Dr. Ved Kumari) (see external link below). It correctly represents the religious spirit of ancient India.
709-710a. O Brahman, the god Visnu, the lord of the world, shall be (born as) the preceptor of the world, Buddha by name, at the time when the Pusya is joined with the moon, in the month of Vaisaksha, in twenty eighth Kali Age.
710b-12. Listen from as to how his worship should be performed in the bright-half, from that period onwards, in future. The image of Buddha should be bathed (with water rendered holy) with all medicinal herbs, all jewels and all scents, in accordance with the sayings of the Sakyas. The dwellings of the Sakyas (i.e. Viharas) should be whitewashed with care.
713. Here and there, the Caityas - the abodes of the god - should be provided with paintings. The festival, swarming with the actors and the dancers, should be celebrated.
714. The Sakyas should be honoured with Civara (the dress of a Buddhist mendicant), food and books. All this should be done till the advent of Magha.
715. O twice-born, eatable offerings should be made for three days. Worship with flowers, clothes etc. and charity for the poor (should continue for three days).
Kalhana's Rajatarangini mentions that a monumental metallic image of Buddha once stood in Srinagar, which was eventually destroyed by Sikandar Butshikan. A significant number of beautifully crafted Buddhist bronzes have survived.
In Kashmir valley, a Buddhist Bhikshu was present in Baramula in the 13th century. The Kashmiri Pandits still worship the triratna symbol.