The disastrous fall of Warangal in A.D.1323 brought the Andhras, for the first time in their history, under the yoke of an alien ruler, the Muslims. In A.D.1347 an independent Muslim State, the Bahmani kingdom was established in south India by Alla-ud-din Hasan Gangu by revolting against the Delhi Sultanate. To stabilise his position, Hasan waged wars to annexe the two neighbouring Hindu kingdoms, Warangal, under the Musunuri Nayakas, and Vijayanagar, which was under the Rayas. He occupied the area up to the river Tungabhadra in A.D.1358, and shifted his capital from Daulatabad to Gulbarga. The Hindu rulers, however, reoccupied their lost territory during the period between A.D.1358-75. Harihara Raya II of Vijayanagar conquered many areas which were under the Bahmanis during the period of Muhammad Shah II (A.D.1378-1397). The successors of Muhammad Shah II, who were also hostile to Rayas of Vijayanagar, waged wars against them. But they were defeated by the Vijayanagar armies. During the reign of Muhammad III (A.D.1463-82), the Bahmanis, for the first time, extended their empire from sea to sea and thereby got into their possession a large part of the Telugu area, namely, the area north of the Krishna up to the coast and the present Guntur district. By the end of the 15th century the Bahmani rule was plagued with faction fights and there came into existence the five Shahi kingdoms, the Nizamshahis of Ahmadnagar, the Adilshahis of Bijapur, the Imadshahis of Berar, the Qutbshahis of Golconda and the Baridshahis of Bidar. Thereafter, the rule of the Bahmani dynasty came to an end in A.D.1527. Of the five Shahi dynasties, it was the Qutbshahi dynasty that played a significant and notable role in the history of Andhras.