The Lawīk dynasty or Lōyak dynasty was based in Ghazni and Gardez, present-day Afghanistan. They formerly practiced Hinduism but converted to Islam in the 8th century. The Lawik were closely related to the Kabul Shahi and Hindu Shahi dynasties. The Siyasatnama of Nizam al-Mulk, the Tabaqat-i Nasiri of Juzjani, and the Majma' al-ansāb fī't-tawārīkh of Muhammad Shabankara'i mentioned Lawiks.
Wujwir Lawik
According to Afghan historian Abdul Hai Habibi, Wujwir Lawik built a great idol-temple at Bamyan Gate, Ghazni in honor of the Ratbil and the Kabul Shah.
Khanan Lawik
Wujwir's son, Khanan, converted to Islam around 782 but then became an apostate. Around 784, Khanan demolished the idol-temple and buried his father's idol underneath it, converting the site into a mosque. Khanan was sent a poem by the Kabul Shahis, saying: "Alas! The idol of Lawik has been interred beneath the earth of Ghazna, and the Lawiyan family have given away their kingly power. I am going to send my own army; do not yourself follow the way of the Arabs ."
In 962, the Turkic slave commander of the Samanid Empire, Alp-Tegin, attacked Ghazni and besieged the Citadel of Ghazni for four months. He wrested the town from its ruler Abu Bakr Lawik. Alp-Tegin was accompanied by Sabuktigin during this conquest. Around 965, Abu Bakr Lawik recaptured Ghazni from Alp-Tegin's son, Abu Ishaq Ibrahim, forcing him to flee to Bukhara. However, this was not to last long because Abu Ishaq Ibrahim shortly returned to the town with Samanid aid, and took control of the town once again. Abu Bakr Lawik was thereafter no longer mentioned; he died before 977, the year that Ghaznavid control was established in Ghazni. Although Juzjani gave Abu Bakr Lawik the Islamic kunya of Abu Bakr, Shabankara'i claimed he was a non-Muslim.
was the son of Abu Bakr Lawik, and also a brother-in-law of the Hindu Shahi ruler of the region, Kabul Shah. About one decade after Abu Ishaq Ibrahim's capture of Ghazni, the people of Ghazni invited Abu Ali Lawik to come back, take the throne, and overthrow the tyrant Samanid-appointed governor, Böritigin. The Kabul Shahis allied with Lawiks and the king, most likely Jayapala, sent his son to assist Lawiks in the invasion. When the allied forces reached near Charkh on Logar River, they were attacked by Sabuktigin who killed and captured many of them while also capturing ten elephants. Böritigin was expelled and Sabuktigin became governor in 977 A.D. The accession was endorsed by the Samanid ruler Nuh II.
Later Lawiks
On the other hand, the neighboring town of Gardez remained in Lawik hands until c. 977, when the dynasty was finally uprooted. Samanid-appointed governor Bilgetegin was killed by Lawiks during his siege of Gardez in 975.
Abu Sahal Marsal
According to Zayn al-Akhbar, Abu Sahal Marsal Lawik served as the ambassador of the court of Ghazni in Baghdad, and brought letters and robes of honor from the Abbasid Caliphate for the Ghaznavid Sultan Mas'ud I in 1040.