with the Marathas and the Nizam of Golconda, culminating in the First Anglo-Mysore War in 1767. Despite numerical superiority Haider Ali suffered defeats at the battles of Chengham and Tiruvannamalai. The British ignored his overtures for peace until Haider Ali had strategically moved his armies to within five miles of Madras (modern Chennai) and was able to successfully sue for peace. In 1770, when the Maratha armies of Madhavrao Peshwa invaded Mysore (three wars were fought between 1764 and 1772 by Madhavrao against Haider, in which Haider lost), Haider expected British support as per the 1769 treaty but they betrayed him by staying out of the conflict. The British betrayal and Haider's subsequent defeat reinforced Haider's deep distrust of the British—a sentiment that would be shared by his son and one which would inform Anglo-Mysore rivalries of the next three decades. In 1777, Haider Ali recovered the previously lost territories of Coorg and Malabar from the Marathas. Haider Ali's army advanced towards the Marathas and fought them at the Battle of Saunshi and came out victorious during the same year. By 1779, Haider Ali had captured parts of modern Tamil Nadu and Kerala in the south, extending the Kingdom's area to about 80,000 mi2 (205,000 km2). In 1780, he befriended the French and made peace with the Marathas and the Nizam. However, Haider Ali was betrayed by the Marathas and the Nizam, who made treaties with the British as well. In July 1779,Haider Ali headed an army of 80,000, mostly cavalry, descending through the passes of the Ghats amid burning villages, before laying siege to British forts in northern Arcot starting the Second Anglo-Mysore War. Haider Ali had some initial successes against the British notably at Pollilur, the worst defeat the British suffered in India until Chillianwala, and Arcot, until the arrival of Sir Eyre Coote, when the fortunes of the British began to change. On 1 June 1781 Coote struck the first heavy blow against Haider Ali in the decisive Battle of Porto Novo. The battle was won by Coote against odds of five to one, and is regarded as one of the greatest feats of the British in India. It was followed up by another hard-fought battle at Pollilur (the scene of an earlier triumph of Haider Ali over a British force) on 27 August, in which the British won another success, and by the rout of the