The kingdom remained independent until it was annexed by the Mughal Empire in 1581 after the death of Chandrasen Rathore. It remained under direct Mughal control until Udai Singh was restored to the throne as a vassal and given the title of Raja in 1583. During the late 17th century it was under the strict control of the Mughal Emperor Aurangzeb, but the ruling house of Rathore was allowed to remain semi-autonomous in their territory. During this time Durgadas Rathore struggled to preserve the rathore dynasty and freed Marwar from the Mughal Empire after 31 years of war. In the late 18th and early 19th centuries the kingdom was overrun by the Maratha hordes of Scindia and Holkar. Marwar was financially bankrupt due to heavy tributes exacted by the Marathas and its once renowned army had now thinned down because of internal wars and rebellions by its nobles, forcing its rulers to ask the British for aid. The British had no role in the state's affairs until 6 January 1818, when the Raja at that time, Man Singh, entered into a subsidiary alliance, after which the Rajas of Marwar (or Jodhpur) continued as rulers of a princely state. During the Indian Rebellion of 1857, the Rajput Nobles of Pali under Thakur Kushal Singh Rathore led a rebellion against Raja Takht Singh and the British, however the rebellion was put to an end by the British armies under colonel Holmes after a siege of the Thakurs fort in Auwa. The armies of Jodhpur State fought in World War I for the British. They actively fought in Afghanistan and the Middle-east and scored a series of victories for the British empire. The Jodhpur lancers with the support of the Mysore lancers defeated a large host of Turks and Germans in the Battle of Haifa (1918). Some of the other battles they participated in were the battles of Suez, Gaza, Jordan Valley, Abu Tellul and Megiddo.