The Kingdom of Mysore was a realm in southern India, traditionally believed to have been founded in 1399 in the vicinity of the modern city of Mysore. From 1799 until 1950, it was a princely state, until 1947 in a subsidiary alliance with British India. The British took direct control over the princely state in 1831. Upon accession to the Dominion of India, it became Mysore State, later uniting with other Kannada speaking regions to form the state of Karnataka, with its ruler remaining as Rajapramukh until 1956, when he became the first governor of the reformed state. The kingdom, which was founded and ruled for most part by the Hindu Wodeyar family, initially served as feudatories under the Vijayanagara Empire. The 17th century saw a steady expansion of its territory and during the rule of Narasaraja Wodeyar I and Chikka Devaraja Wodeyar, the kingdom annexed large expanses of what is now southern Karnataka and parts of Tamil Nadu to become a powerful state in the southern Deccan. During a brief Muslim rule, the kingdom shifted to a Sultanate style of administration under Hyder Ali and Tipu Sultan, and was renamed as "Sultanat-e-Khudadad", translating into "The God gifted empire". During this time, it came into conflict with the Marathas, the Nizam of Hyderabad, the Kingdom of Travancore and the British, which culminated in the four Anglo-Mysore Wars. Success in the First Anglo-Mysore war and stalemate in the Second was followed by defeats in the Third and the Fourth. Following Tipu Sultan's death in the fourth war in the Siege of Seringapatam (1799), large parts of his kingdom were annexed by the British, which signalled the end of a period of Mysorean hegemony over South India. The British restored the Wodeyars to their throne by way of a subsidiary alliance and the diminished Mysore was transformed into a princely state. The Wodeyars continued to rule the state until Indian independence in 1947, when Mysore acceded to the Union of India. Even as a princely state, Mysore came to be counted among the more developed and urbanised regions of India.