The Kingdom of Mysore in southern India expanded to its greatest extent under Hyder Ali and his son Tipu Sultan in the later half of the 18th century. Under their rule, Mysore fought series of wars against the Marathas and British or their combined forces. The Maratha–Mysore War ended in April 1787, following the finalizing of "treaty of Gajendragad", in which, Tipu Sultan was obligated to pay tribute to the Marathas. Concurrently, the Anglo-Mysore Wars took place, where the Mysoreans used the Mysorean rockets. The Fourth Anglo-Mysore War (1798–1799) saw the death of Tipu. Mysore's alliance with the French was seen as a threat to the British East India Company, and Mysore was attacked from all four sides. The Nizam of Hyderabad and the Marathas launched an invasion from the north. The British won a decisive victory at the Siege of Seringapatam (1799).