Kanpur is the 12th most populous city in India and the second largest city in the state of Uttar Pradesh after Lucknow. The city is the administrative headquarters of Kanpur Nagar district and Kanpur division.The name of the city is believed to have derived from Karnapur (meaning "town of Karna", one of the heroes of the Mahabharata). Another theory is that it came from the nearby town of Makanpur, earlier known as Khairabad, where the Sufi saint of the Madariya Sufi order, Badiuddin Zinda Shah Madar, settled.HistoryIn 1207, Raja Kanh Deo of the Kanhpuria clan established the village of Kanhpur, which later came to be known as Kanpur.1857 uprisingIn the 19th century, Cawnpore was an important British garrison with barracks for 7,000 soldiers. During the Indian Rebellion of 1857, 900 British men, women and children were besieged in the fortifications for 22 days by rebels under Nana Sahib Peshwa. They surrendered on the agreement that they would get safe passage to the nearby Satti Chaura Ghat whereupon they would board barges and be allowed to go by river to Allahabad.