Kabul : The Kabul Shahi & Hindu Shahi
The decline of the Kushana Empire in the portions of Modern Afghanistan was followed by the Kabul Shahi Kingdoms. They ruled from 4th century AD till 870 AD.
Since the capital was Kabul, the kingdom was called Kabul Shahi.
Its worth note that the word Shahi as a title was used by the Sakas, Kushanas, Hunas, Bactirans etc of Kabul.
The Kushana used "Shao" and Mihirkula- the Huna tyrant used the word Ssaha.
The Kushana also used the title Shaonano Shao (Shah-in-Shai). In the later part of 9th century the Kings of Kabulshahi were overthrown by a Brahmin officer called "Lalliya".
Lalliya was a minister in service of the Kabul's Kings. He founded the "Hindu Shahi" dynasty (or Brahman Shahi) in Afghanistan which lasted till 1021 AD, when it was overthrown by the Muslims.
The Capital was the Hindu-shahi Kingdom was "Hund", a village near Peshawar in Pakistan on the Banks of River Indus.
Hund was the site where Alexander the great crossed the Indus river.
Some of the rulers of the Hindu Shahi of Afghanistan were Lalliya, Kamala Toramana, Bhimadeva, Jaipala, Anandapala, Trilochanpala, Bhimapala etc. as mentioned by Kalhana.
The throne of Lalliya after his death was taken over by Jayapala who is also known as First King of Hindu Shahi (Janjua Shahi) dynasty by some scholars. Jayapala is known to have defended the Kingdoms from the frequent raids of Turkic rulers of Ghazni.
Jayapala was followed by an able prince Anandpala.
Anandpala also protected the Kingdom from various attacks but his last stand was against Sultan Mahmud of Ghazni. He is known to have signed a treaty with Sultan Mahmud of Ghazni and died later in peace. He is compared to ancient King Porus by some noted historians like Mazumdar.
Kashmir – Kabul Relations:
During the latter half of the 10th century, in the times of Shankarvarman, a daughter of Kabul King Didda was married to the King of Kashmir called Khemagupta. She was daughter of a Lohar Sardar Simhraj. She was an unscrupulous woman who first ruled as queen consort, later as coregent for her Son, when he husband died and later independently. She ruled from 980 AD to 1003 AD and this 23 years time period is known for a mismanaged rule. In her time, the Kingdom suffered an attack of Mahmud of Ghazni, but remained independent mostly because of the inaccessibility due to mountains.
The later years were miserable for Kashmir but it was sovereign due to the Natural defense by the mountains.
A Local Mohammedan dynasty under Shah Mir Swati obtained power in 1339 and founded Shah Miri Dynasty or Swati Dynasty, as he came from Swat. The religion of Islam gradually spread in the valley. The Kingdom was naturally defended from the Sultanate rulers but finally Akbar annexed it in the Mughal Empire in 1587.