Srinagar has a long history, dating back at least to the 3rd century BC, and has been known by different names. The city is said to have been founded by the King Pravarasena II over 2,000 years ago, named it Parvasenpur. The city was then a part of the Maurya Empire, one of the largest empires of the Indian subcontinent. Ashoka introduced Buddhism to the Kashmir valley, and the adjoining regions around the city became a centre of Buddhism. In the 1st century, the region was under the control of Kushans, based out of modern Pakistan and Afghanistan. Several rulers of this dynasty strengthened the Buddhist tradition. Vikramaditya (of Ujjain) and his successors probably ruled the regions just before the city fell to the control of the Huns-a nomadic tribe from central Asia in the 6th century, and Mihirkula was the most dreaded ruler of the city and the valley..
Srinagar became the capital of Kashmir around 960 CE. Some of the notable independent rulers were Lalit Aditya, Avantivarman who named his city Avantipora and Sangrama Deva.