Gandhara was ruled from Kabul by Kabulshahi for next 200 years. Sometime in the 9th century the Kabul Shahi replaced the Shahi. Based on various Muslim records it is estimated this occurred in 870. According to Al-Biruni (973-1048), Kallar, a Brahmin minister of the Kabulshahi, founded the Shahi dynasty in 843. The dynasty ruled from Kabul, later moved their capital to Udabhandapura. They built great temples all over their kingdoms. Some of these buildings are still in good condition in the Salt Range of the Punjab.