Nawab-Bahadur Sardar Muhammad Habib Khan Tarin (1829-1888) , Risaldar, CSI, was a tribal chieftain, nobleman and cavalry officer of Tarin Afghan descent, who lived in the Hazara region on the Punjab Frontier, in British India.
Muhammad Habib Khan was the son of Sardar Karam Khan, a chieftain of the Tarin (or Tareen) tribe settled at Talokar (village) , near Haripur town, in the Hazara region. In 1849, after the conclusion of the Second Anglo-Sikh War of 1849, the Punjab and its Frontier were annexed by the British and Major James Abbott (Indian Army officer) was sent as the Hazara's first Deputy commissioner. The Tarin clan, which had previously resisted Sikh rule, refused to accept the new British rulers and came into conflict with Major Abbott, who deposed many of the tribe's chiefs and leaders and confiscated their lands and properties. Habib Khan was also one of these chieftains and he escaped into the nearby Gandhgarhi hills and kept up a fierce struggle against the British.
The situation became very hazardous for Habib Khan when Major Abbott tightened control over the Gandhgarhi hills and environs, through the help of the Tahirkheli and Mishwani tribes, and he might have been taken prisoner at this time. However, by chance, Khan came into contact with another British officer Colonel Robert Cornelis Napier (later Field Marshal Lord Napier of Magdala) , who was working on a road construction project nearby; and Napier befriended the young chieftain and helped him to obtain an amnesty from the Punjab Government, enabling him to return home.
Napier realised that the young chieftain could be an effective native military officer, and he utilised Khan and his retainers during the First Black Mountain Campaign of late 1852 and later on, in other campaigns. In Spring 1856, Habib Khan, on Napier's recommendation, went to Lahore, where Captain Thomas Rattray was at that time raising a new battalion for service in Bengal and Bihar., and enrolled as a Jemadar of the cavalry section of what was then the 1st Bengal Military Police Battalion, along with several retainers.