 During this time, Mysore kingdom came into conflict with the Marathas, the British and the "Nizam" of Golconda, leading to the four Anglo-Mysore wars, success in the first two of which was followed by defeat in the third and fourth.After Tipu Sultan's death in the Fourth Anglo-Mysore War in 1799, the capital of the kingdom was moved back to Mysore from Seringapatam, and the kingdom was distributed by the British to their allies of the Fourth Mysore war.The landlocked interior of the previous Mysore Kingdom was turned into a princely state under the suzerainty of the British Crown.