The city was a powerful urban centre in South India from 14th to 16th century and one of the ten largest cities of the world. It stood as a bastion of Hindu values dedicated to fighting back the encroachments of the Muslim sultans from the north, who soon came to be operating from Golkonda. The Sangama dynasty was involved in repeated conflicts with the Bahamani Sultanate. The Bahamanis had later disintegrated into five sultanates which formed a Deccan alliance. Krishnadevaraya after the Battle of Raichur allowed one sultan to stay in power rather than let it split into smaller kingdoms. However, later Vijayanagara kings had to contend with multiple Sultanates to their north. The Vijayanagara kingdom befriended and allowed the Portuguese to take control of Goa and western territories of the Bahamani Sultanate. The sultanates united against the Vijayanagara Empire.