In 1789, Tipu Sultan disputed the acquisition by Dharma Raja of Travancore of two Dutch-held fortresses in Cochin. In December 1789 he massed troops at Coimbatore, and on 28 December made an attack on the lines of Travancore, knowing that Travancore was (according to the Treaty of Mangalore) an ally of the British East India Company. On account of the staunch resistance by the Travancore army, Tipu was unable to break through the Tranvancore lines and the Maharajah of Travancore appealed to the East India Company for help. In response, Lord Cornwallis mobilised company and British military forces, and formed alliances with the Marathas and the Nizam of Hyderabad to oppose Tipu. In 1790 the company forces advanced, taking control of much of the Coimbatore district. Tipu counter-attacked, regaining much of the territory, although the British continued to hold Coimbatore itself. He then descended into the Carnatic, eventually reaching Pondicherry, where he attempted without success to draw the French into the conflict.