The forebears of the Asaf Jahi Dynasty came to India from Samarkand, in Central Asia, but the family actually originated from Baghdad. In 1724, the Mughal Governor of the Deccan, (Nizam ul-Mulk) Qamar-ud-din Khan, Asaf Jah I, established himself as an independent ruler of Deccan. Hyderabad became the capital and later lent its name to that of the state he had created. The first Nizam's successors became closely allied to the British colonialists, frequently assisting them in subduing their enemies, the Maratha dynasty, Tipu Sultan of Mysore, and the French. In later years, the Nizam's troops invariably took part in all the main campaigns undertaken by the British Indian Army. Large numbers of his troops took part in the First and Second World Wars. These contributions earned for the Nizam unequalled titles and honours from a grateful Emperor.