ghan Rohillas came into prominence. His adopted son Ali Muhammad Khan succeeded in carving out an estate for himself in the district with his headquarters in the region. He was ultimately made the lawful governor of Kateher by the Mughal emperor Aurangzeb Alamgir (ruled 1658–1707) and the region was henceforth called "the land of the Ruhelas." After the end of the Mughal Empire many Pathans migrated from Rohilkhand.
Bareilly was a ruined city and became crowded with unemployed, restless Rohilla Pathans. Many urban cities in Uttar Pradesh were experiencing economic stagnation and poverty. This led to heavy migration overseas to Suriname and Guyana.
Ali Muhammad Khan
Meanwhile, Ali Muhammad Khan (1737–1749), grandson of Shah Alam, captured the city of Bareilly and made it his capital, later uniting theRohillas to form the "State of Rohilkhand", between 1707 and 1720. He rapidly rose to power and got confirmed in possession of the lands he had seized. The Emperor created him a Nawab in 1737 and he was recognized as the governor of Rohilkhand in 1740.
According to 1901 census of India, the total Pathan population in Bareilly District was 40,779, out of a total population of 1,090,117. Their principal clans were the Yusafzais,Lodis, Ghilzai, Barech, Marwat, Durrani, Tanoli, Tarin, Kakar, Khattak, Afridi and Baqarzai. Other important cities were Rampur, Shahjahanpur, Badaun and others.
Ali Muhammad was succeeded by Hafiz Rahmat Khan Barech (1749–1774), whom he appointed hafiz or regent of Rohilkhand on his deathbed. Hafiz Rahmat Khan Barech extended the power of Rohilkhand from Almora in the North to Etawah in the South-West.
Under Rahmat Ali Khan, Rohilla power continued to rise, though the area was torn by strife among the rival chieftains and continuous struggles with the neighbouring powers, particularly the Nawab Vazirs of Awadh, the Bangash Nawabs and