Due to geographical position of Kashmir it has a history different from rest of the country. The Rajatarangini, written by Kalhana in the twelfth century provides useful information about the dynasties of Kashmir. It was a part of Ashoka`s empire, after his demise his son Jaluka had established an independent kingdom. Later on, the Huna ruler Mihirakula established his rule in Kashmir. In the beginning of the seventh century, Durlabha Vardhana of Naga-Karkota dynasty established his rule there. He ruled for thirty six years. He had good relations with Emperor Harsha Vardhana of Kannauj. He was succeeded by Durlabha. His son, Chandrapida, succeeded to the throne after him. During his reign, there was Arab invasion but Chandrapida overpowered him. He was succeeded by his brother, Lalitaditya Muktapida.
Lalitaditya proved to the most memorable king of this dynasty. He defeated Tibetans and the mountain tribes on the North-Western frontiers of his kingdom and conquered part of Punjab. He defeated Yashovarman and conquered Kannauj. Lalitaditya was a generous ruler who gave protection to Hinduism and Buddhism. He built many temples, towns, monasteries, and images of gods. Jayapida and Vinayaditya the successors proved to be a weak ruler. Only one among them, Jayapida, tried to revive the glory of the dynasty and attempted to conquer Magadha but was not successful. Subsequently there was a succession of weak rulers and the dynasty was replaced by the Utpala dynasty.
Avanti Varman was the founder of Utpala dynasty. He never wanted to expand his kingdom but kept it secure and wanted to bring about economic prosperity to Kashmir. He was succeeded by Shankara Varman who tried to bring back Kashmir to its former position as a great political power. He was engaged himself in wars. All his successors were weak rulers, which led to the ruin of this dynasty. Its last ruler was Sura Varman II who was also dethroned.
After Sura Varman, Yasaskara, son of Prabhakaradeva, treasurer of the kings Shankara Varman became king. He restored peace and order in the country. He was succeeded by his son, Sangramadeva, who was killed by his minister, Parva Gupta. He also died after a year and his son, Kshema Gupta, succeeded him. He was succeeded by few more kings before his wife became the real power behind the throne. She before her death chose her nephew Sangramaraja of Lohara as her successor.
The centre of Lohara dynasty was at Lohran. This dynasty ruled Kashmir for more than a century. The spirituality that the Lohara`s from Iran introduced was soothing stream aimed at rising up of moral and spiritual values and oneness of God. Kashmiris accepted it in all forms. The Lohara Dynasty led to decline of Buddhism. The tarkhan lohars originate from Iran who migrated to India. They were forced by King Akbar to work as blacksmiths to make weapons for the army. Many Tarkhan clans are also cross-listed as Khatri, Jat and Rajputs, due to Tarkhans having the same racial lineage and racial type as these castes.
In many parts, it is largely due to familial tradition that some members of a certain clan dub themselves Rajput and others of the same clan are Gujjar, Jat, Khatri, Kamboj and Tarkhan. The Lohara dynasty never had any capable ruler. Sangramaraja supported Trilochanapala of the Hindushahi dynasty against Sultan Mahmud. Mahmud did attack Kashmir but failed to capture it. His successor also proved incompetent and Kashmir was troubled by internal disruption and the oppression of its rulers on their subjects. Eventually one Muslim adventurer, Sahamera, captured the throne of Kashmir and called himself Sultan Shams-ud-din. He and his successors ruled Kashmir for reasonably long time.