Hindushahi Kingdom
The decline of the Kushana Empire (Modern Afghanistan) was followed by the Kabul Shahi Kingdoms. They ruled over there from 4th century to 9th century AD. Kabul was the capital of Shahi’s, so the kingdom was called Kabul Shahi. At the end of 9th century the Kings of Kabulshahi were overthrown by a "Lalliya", Brahmin minister in service of the Kabul's Kings. After death of Lalliya, throne was taken 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.
While a Brahmana dynasty known as the Hindu Shahis, was ruling from Kabul, another Brahmana dynasty ruled in Punjab, between the rivers Satluj and Sindh. According to Al Beruni Bhima Deva Shahi was the fourth king of Hindu Shahi kings of Kabul. In his old age, he committed ritual suicide in his capital town of Waihind, located on the right side of river Sindh. After Bhim Deva Shahi’s death Jayapala, son of Prithvipal of Punjab, succeeded to the combined kingdoms of Punjab and Eastern Afghanistan. Thus Jayapala ruled over a vast area from Sirhind to Kabul.
During this period Sabuktagin ascended on the throne of Ghazni in 977. Firstly he annexed Muslim ruled countries i.e Bust, Dawar, Qusdar, Tukhristan and Gaur to his kingdom then he conquered all Shahi territories in Afghanistan .After death of Sabuktagin in 997, throne was ascended by his son Mahmud. Mahmud first consolidated his position in the west. He stood in the place of the great Samanids, his former over-lords. Having acquired considerable fighting experience and a seasoned army, Mahmud was ready to deal with ‘Hind’.
Sources:
http://en.wikipedia.org/wiki/History_of_the_Punjab
While a Brahmana dynasty known as the Hindu Shahis, was ruling from Kabul, another Brahmana dynasty ruled in Punjab, between the rivers Satluj and Sindh. According to Al Beruni Bhima Deva Shahi was the fourth king of Hindu Shahi kings of Kabul. In his old age, he committed ritual suicide in his capital town of Waihind, located on the right side of river Sindh. After Bhim Deva Shahi’s death Jayapala, son of Prithvipal of Punjab, succeeded to the combined kingdoms of Punjab and Eastern Afghanistan. Thus Jayapala ruled over a vast area from Sirhind to Kabul.
During this period Sabuktagin ascended on the throne of Ghazni in 977. Firstly he annexed Muslim ruled countries i.e Bust, Dawar, Qusdar, Tukhristan and Gaur to his kingdom then he conquered all Shahi territories in Afghanistan .After death of Sabuktagin in 997, throne was ascended by his son Mahmud. Mahmud first consolidated his position in the west. He stood in the place of the great Samanids, his former over-lords. Having acquired considerable fighting experience and a seasoned army, Mahmud was ready to deal with ‘Hind’.
Sources:
http://en.wikipedia.org/wiki/History_of_the_Punjab