During Jang Bahadur Rana's regime, a large number of Muslims migrated to the tarai from India fleeing persecution by the British army during the Sepoy Mutiny in 1857. These refugees settled in the Terai region, selling leather goods or working as agricultural labourers. A senior courtier to the Mughal Emperor Bahadur Shah Zafar also fled to Kathmandu. Later, he renovated the Jama Masjid and was buried there. During the Sepoy Mutiny, Begum Hazrat Mahal, wife of Nawab Wajid Ali Shah of Lucknow also escaped to Kathmandu via Nepalganj and was allowed by Jang Bahadur to take refuge in Nepal. She settled down at the Thapathali Durbar and later died in Kathmandu and was also buried at the Nepali mosque.