The British sent Bahadur Shah II, the last Mughal Emperor, out of India, and kept him in Yangon (then called Rangoon), Burma where he died in 1862. The Mughal dynasty, which had ruled India for about four hundred years, ended with his death.