of Afghanistan, the Ottoman Empire and Arabia. However, these attempts to involve the French soon became known to the British, who were at the time fighting the French in Egypt, were backed by the Marathas and the Nizam. In 1799, Tipu died defending Srirangapatna in the Fourth Anglo-Mysore War, heralding the end of the Kingdom's independence. Modern Indian historians consider Tipu Sultan an inveterate enemy of the British, an able administrator and an innovator. Princely state Following Tipu's fall, a part of the kingdom of Mysore was annexed and divided between the Madras Presidency and the Nizam. The remaining territory was transformed into a Princely State; the five-year-old scion of the Wodeyar family, Krishnaraja III, was installed on the throne with chief minister (Diwan) Purnaiah, who had earlier served under Tipu, handling the reins as regent and Lt. Col. Barry Close taking charge as the British Resident. The British then took control of Mysore's foreign policy and also exacted an annual tribute and a subsidy for maintaining a standing British army at Mysore. As Diwan, Purnaiah distinguished himself with his progressive and innovative administration until he retired from service in 1811 (and died shortly thereafter) following the 16th birthday of the boy king. The years that followed witnessed cordial relations between Mysore and the British until things began to sour in the 1820s. Even though the Governor of Madras, Thomas Munro, determined after a personal investigation in 1825 that there was no substance to the allegations of financial impropriety made by A. H. Cole, the incumbent Resident of Mysore, the Nagar revolt (a civil insurrection) which broke out towards the end of the decade changed things considerably. In 1831, close on the heels of the insurrection and citing mal-administration, the British took direct control of the princely state, placing it under a commission rule. For the next fifty years, Mysore passed under the rule of successive British Commissioners; Sir Mark Cubbon, renowned for his statesmanship, served from 1834 until 1861 and put into place an efficient and successful administrative system which left Mysore a well-developed state. In 1876–77, however, towards the end of the period of direct British rule, Mysore was struck by a devastating famine with estimated mortality figures ranging between 700,000 and 1,100,000, or nearly a fifth of the population. Shortly thereafter, Maharaja Chamaraja X, educated in the British system, took over the rule of Mysore in 1881,