Bahadur Shah II, better known as Bahadur Shah Zafar, was the last Mughal emperor. After the uprising of 1857, British authorities deposed him and exiled him to Rangoon, effectively ending the Mughal dynasty.