<P> 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 The Mughals were descended from Persianised Central Asian Turks (with significant Mongol admixture). In the Mughal era, Uttar Pradesh became the heartland of the empire . Mughal emperors Babur and Humayun ruled from Agra . In 1540 an Afghan, Sher Shah Suri, took over the reins of Uttar Pradesh after defeating the Mughal king Humanyun . Sher Shah and his son Islam Shah ruled Uttar Pradesh from their capital at Gwalior . After the death of Islam Shah Suri, his prime minister Hemu became the de facto ruler of Uttar Pradesh, Bihar, Madhya Pradesh, and the western parts of Bengal . He was bestowed the title of Vikramaditya at his coronation in Purana Quila in Delhi . Hemu died in the Second Battle of Panipat, and Uttar Pradesh came under Emperor Akbar's rule . Akbar ruled from Agra and Fatehpur Sikri . In the 18th century, after the fall of Mughal authority, the power vacuum was filled by the Maratha Empire, in the mid 18th century, the Maratha army invaded the Uttar Pradesh region, which resulted in Rohillas losing control of Rohillkhand to the Maratha rulers Raghunath Rao and Malharao Holkar . The conflict between Rohillas and Marathas came to an end on 18 December 1788 with the arrest of Ghulam Qadir, the grandson of Najeeb - ud - Daula, who was defeated by the Maratha general Mahadaji Scindia . 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 . </P> <P> 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 . Ajmer and Jaipur kingdoms were also included in this northern territory, which was named the "North - Western Provinces" (of Agra). Although UP later became the fifth largest state of India, NWPA was one of the smallest states of the British Indian empire . Its capital shifted twice between Agra and Allahabad . </P> <P> 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 . It came to be known as the Indian Rebellion of 1857 . After the revolt failed, the British attempted to divide the most rebellious regions by reorganising the administrative boundaries of the region, splitting the Delhi region from' NWFP of Agra' and merging it with Punjab, while the Ajmer - Marwar region was merged with Rajputana and Oudh was incorporated into the state . The new state was called the' North Western Provinces of Agra and Oudh', which in 1902 was renamed as the United Provinces of Agra and Oudh . It was commonly referred to as the United Provinces or its acronym UP . </P> <P> In 1920, the capital of the province was shifted from Allahabad to Lucknow . The high court continued to be at Allahabad, but a bench was established at Lucknow . Allahabad continues to be an important administrative base of today's Uttar Pradesh and has several administrative headquarters . Uttar Pradesh continued to be central to Indian politics and was especially important in modern Indian history as a hotbed of the Indian independence movement . Uttar Pradesh hosted modern educational institutions such as the Benaras Hindu University, Aligarh Muslim University and the Darul Uloom Deoband . Nationally known figures such as Chandra Shekhar Azad were among the leaders of the movement in Uttar Pradesh, and Motilal Nehru, Jawaharlal Nehru, Madan Mohan Malaviya and Gobind Ballabh Pant were important national leaders of the Indian National Congress . The All India Kisan Sabha (AIKS) was formed at the Lucknow session of the Congress on 11 April 1936, with the famous nationalist Swami Sahajanand Saraswati elected as its first President, in order to address the longstanding grievances of the peasantry and mobilise them against the zamindari landlords attacks on their occupancy rights, thus sparking the Farmers movements in India . During the Quit India Movement of 1942, Ballia district overthrew the colonial authority and installed an independent administration under Chittu Pandey . Ballia became known as "Baghi Ballia" (Rebel Ballia) for this significant role in India's independence movement . </P>

What was the state of uttar pradesh known as before independence