The greatest ruler of the Pratihara dynasty was Mihir Bhoja. He recovered Kanauj (Kanyakubja) by 836, and it remained the capital of the Pratiharas for almost a century. He built the city Bhojpal (Bhopal). Raja Bhoja and other vallent Gujara kings, faced and defeated many attacks of the Arabs from west. Between 915-918AD, Kanauj was attacked by a Rashtrakuta king, who devastated the city leading to the weakening of the Pratihara empire. In 1018, Kannauj then ruled by Rajyapala Pratihara was sacked by Mahmud of Gazni. The empire broke into independent Rajput states