Mangalore and the rest of Tulu Nadu. Eventually in 1613, Venkatappa Nayaka I became independent and was the most powerful ruler in Tulu Nadu, taking territory which owed fealty to Bijapur and aiding Rani Abbakka. Under Shivappa Nayaka, the Nayakas of Keladi, now with capital at Bidnur, conquered the entirety of Tulu Nadu. Shivappa Nayaka utterly defeated the power of the Portuguese in Tulu Nadu. His successor made a treaty with the Portuguese where they could set up unarmed factories in Mangalore and Basrur, but were not to convert the locals. His successor, Keladi Chennamma, is famous for sheltering Rajaram and fending off Aurangzeb's forces. She also put down rebellions of Tuluva chieftains. During this time Arab traders, who were kicked out by the Portuguese, burnt Mangalore and other trade towns. In 1714, due to trade disputes, the Portuguese bombarded Mangalore and defeated the ruler Basavappa Nayaka I, who promised to ban Arab traders from entering. From 1757 to 1763, while Queen Veerammaji was looking after the kingdom, the Ali Raja of Kannur along with Maratha followers led a devastating raid into the district. They plundered to Manjeshwar and took a large booty from the Kollur Mookambika temple. Mysore rule Due to this unrest, Hyder Ali was able to sack Bidnur in 1763 and annex Tulu Nadu the same year. He conquered Mangalore, and set a governor Latif Ali Baig. This threatened English shipping in the Arabian Sea, so during the First Anglo Mysore War in 1766 Company soldiers from Bombay conquered Mangalore. However, as soon as he heard the news of the capture of Bangalore, Tipu Sultan made a lightning attack on Mangalore and forced the British to retreat only a week after they captured Mangalore. Hyder Ali then confiscated all Portuguese holdings in the region due to their support for the English. In 1770, Hyder Ali made a treaty with the British allowing for rice to be supplied from Mangalore to Bombay. The next year, he gave Portuguese some privileges back such as the ability to evangelize. However, in 1776, Hyder Ali revoked all these privildges, ejected the Portuguese from Mangalore and built up a large navy in the region. During the Second Anglo-Mysore War starting in 1781 the British quickly took over most of Tulunadu, as well as Bidnur, due to the treachery of the fort's guardian Iyaz Khan. In March 1783 however, they were forced to