Bahadur Shah II
To save their kingdom, the Mughals once again changed sides and welcomed the Afghans to Delhi. The Mughals remained in nominal control over small areas of India but were never a force again. The empire officially ended in 1857 when its last emperor, Bahadur Shah II, was accused of being involved in the Indian Rebellion and exiled.