In the next decades, the Afghans, Sikhs, and Marathas battled against each other and the Mughals, only to prove the fragmented state of the empire. The Mughal Emperor Shah Alam II made futile attempts to reverse the Mughal decline, and ultimately had to seek the protection of outside powers. In 1784, the Marathas under Mahadji Scindia won acknowledgement as the protectors of the emperor in Delhi, a state of affairs that continued until after the Second Anglo-Maratha War. Thereafter, the British East India Company became the protectors of the Mughal dynasty in Delhi. After a crushed rebellion which he nominally led in 1857–58, the last Mughal, Bahadur Shah Zafar, was deposed by the British, who then assumed formal control of a large part of the former empire, marking the start of the British Raj.