With the death of Bahadur Shah II the Mughal dynasty came to an end. Nana Saheb the last Peshwa had taken an active part in the uprising and had fled to Nepal after the failure of uprise so the office of the Peshwar also came to an end thus ended two of the most formidable foes of the British; the Marathas and the Mughals.