Napoleon Bonaparte, the French commander-in-chief, sought an alliance with Tipu Sultan. Both Tipu Sultan and his father used their French-trained army in alliance with the French in their struggle with the British, and in Mysore's struggles with other surrounding powers, against the Marathas, Sira, and rulers of Malabar, Kodagu, Bednore, Carnatic, and Travancore. Tipu's father, Hyder Ali, rose to power and Tipu succeeded him as the ruler of Mysore upon his father's death in 1782. He won important victories against the British in the Second Anglo-Mysore War and negotiated the 1784 Treaty of Mangalore with them after his father died from cancer in December 1782 during the Second Anglo-Mysore War.