Uttar Pradesh is the most populous state in the Republic of India as well as the most populous country subdivision in the world.
The kingdom of Kosala, in the Mahajanapada era, was located within the regional boundaries of modern-day Uttar Pradesh.According to Hindu legend, the divine king Rama of the Ramayana epic reigned in Ayodhya, the capital of Kosala. Krishna, another divine king of Hindu legend, who plays a key role in the Mahabharata epic and is revered as the eighth reincarnation (Avatar) of the Hindu god Vishnu, is said to have been born in the city of Mathura, in Uttar Pradesh.In the 16th century, Babur, a Timurid descendant of Timur and Genghis Khan from Fergana Valley (modern-day Uzbekistan), swept across the Khyber Pass and founded the Mughal Empire, covering India, along with modern-day Afghanistan, Pakistan and Bangladesh. In 1540 an Afghan, Sher Shah Suri, took over the reins of Uttar Pradesh after defeating the Mughal king Humanyun.In 1803, following the Second Anglo-Maratha War, when the British East India Company defeated the Maratha Empire, much of the region came under British suzerainty.Starting from Bengal in the second half of the 18th century, a series of battles for north Indian lands finally gave the British East India Company accession over the state's territories. Due to dissatisfaction with British rule, a serious rebellion erupted in various parts of North India; Bengal regiment's sepoy stationed at Meerut cantonment, Mangal Pandey, is widely credited as its starting point.In 1920, the capital of the province was shifted from Allahabad to Lucknow.After India's independence, the United Provinces were renamed "Uttar Pradesh", preserving UP as the acronym, notification regarding this was done in union gazette on January 24, 1950.