The regiment was formed on 18 May 1849 as the 1st Regiment of Punjab Infantry by Captain John Coke. It was one of five such regiments raised by Colonel Henry Lawrence, the agent (and brother) of the Governor-General of the Punjab frontier region, John Lawrence, 1st Baron Lawrence, to form the infantry element of the Trans Frontier Brigade. The men were recruited from veterans of disbanded opposition forces after the British annexation in 1848 of the Punjab during the Second Sikh War. In 1851 the regiment was retitled as the 1st Regiment of Infantry, Punjab Irregular Force when the Trans Frontier Brigade, tasked with policing the volatile North-West Frontier, was expanded and renamed the Punjab Irregular Force (PIF), giving rise to the "Piffer" name adopted by the officers and men of the regiments of the PIF and still used to this day by their successor regiments.