Hafiz Rahmat Khan Barech
Hafiz Rahmat Khan Barech (1723 April 1774) was Regent of Rohilkhand in North India, from 1749 to 1774. He was a Pashtun by background, ruling over Rohillas (Afghan highlanders). Hafiz Rahmat Khan had served honorably throughout the reign of three Mughal Emperors: Ahmad Shah Bahadur, Alamgir II and Shah Alam II. He was also a mentor of Prince Mirza Jawan Bakht.
Early life an origins
In 1623 two Afghan brothers of the Barech tribe, Bahadur Shah I and Husain Khan, settled here and founded a small state of Rampur, bringing with them many other Pashtun settlers. Ali Muhammad Khan, grandson of Bahadur Shah I, later united the Rohillas between 1707 and 1720, making Bareilly his capital. Hafiz Rahmat Khan Barech, who was his uncle, succeeded him, extended his power from Almora in the North to Etawah in the South-West.
Victory against Ahmad Shah Durrani (1748)
In the year 1748, Ahmad Shah Durrani led an expedition to plunder the western regions of the Mughal Empire. This incursion posed as a major challenge to the Mughal Emperor Muhammad Shah, who urgently Asaf Jah I from the Deccan in order to lead the Mughal Army based in the North-West South Asia, this army was also headed by Prince Ahmad Shah and according to the advise of Ali Muhamad Khan Rohilla, Hafiz Rahmat Khan was appointed as the Subedar of Sirhind in order to lead and regain and recover territories from the Durrani, forces even Muradyab Khan Kalhoro the Subedar of Sindh to dispatch reinforcements to assist the Mughal Army along the river banks.
Prince Ahmad and the respected Grand Vizier Asaf Jah I were dispatched by the Mughal Emperor Muhammad Shah to command a large Mughal Army of 75,000 to confront the advancing Durrani's. At Sirhind both forces fought a decisive battle and Prince Ahmad was nominally victorious. He was thereupon conferred with the title Bahadur, by the Mughal Emperor.
Mughal Civil War
According to a Firman by Ahmad Shah Bahadur Hafiz Rahmat Khan was assigned to support Imad-ul-Mulk against the corrupt Mughal Grand Vizier Safdarjung, who was defeated and forgiven and thus withdrew to become just the Nawab of Awadh and died in 1753.
When Ahmad Shah Bahadur tried to have young Imad-ul-Mulk removed from the imperial court, the outcast then sought an alliance with the detested Maratha chieftain Sadashivrao Bhau. Together they deposed Ahmad Shah Bahadur after the devastating Battle of Sikandarabad in the year 1754.
Alliance with the Ahmad Shah Durrani
In 1757, the Mughal Emperor Alamgir II with courtiers such as Shah Waliullah, nobles such as Najib-ul-Daula and Hafiz Rahmat Khan, and the imperial family went to Sirhind to meet Ahmad Shah Durrani, whose forces then engaged the Marathas in combat and threatened to overthrow and execute the regime of Imad-ul-Mulk. Ahmad Shah Durrani's relations with the Mughal Emperor, strengthened further when his son Timur Shah Durrani married the daughter of Alamgir II and patronized the Mughal commander Jahan Khan.
Third Battle of Panipat
He played an important part in Indian warfare over several decades, being on the winning side at the Third Battle of Panipat of 1761, but was defeated and killed in the Rohilla War. In 1772 Rohilkhand was invaded and conquered by the Marathas.
Counterattacks against Suraj Mal
In the year 1764, Najib-ul-Daula the administrator of Delhi and the Mughal heartlands faces the relentless warfare by Jat peasants led by the ruthless Suraj Mal, who sacked the Mughal Army garrison at Agra and even looted the silver doors of the Taj Mahal, Hafiz Rahmat Khan was among those commanders in Mughal service who swore to avenge the devastation caused and soon Suraj Mal was defeated and executed.
Internal conflict with Awadh
After the war Nawab Shuja-ud-Daula demanded payment for their help from the Rohilla chief, Hafiz Rahmat Khan Barech. When the demand was refused the Nawab joined with the British under Governor Warren Hastings and his Commander-in-Chief, Alexander Champion, to invade Rohilkhand and Hafiz Rahmat Khan Barech was killed in the ensuing battle at Miranpur Katra in 1774. The whole of Rohilkhand (including Bareilly, Pilibhit and Shahjanpur) was surrendered to the East India Company by the treaty of November 10, 1801. Later, Bareilly was a centre of disaffection for the entire area in the Indian Mutiny of 1857. 
- Genealogy of Rampur princely state, 
- History of Bareilly District The Imperial Gazetteer of India, 1909, v. 7, p. 5.
- Hafiz British Library.
- Jama Masjid Official website of Pilibhit district.
- Philibhit Britannica.com.