From 1845 CE to 1849 CE, Sahiwal was embroiled in the Anglo-Sikh wars. In 1847, Sahiwal came under control of the British East India Company. In that year, a British revenue officer was sent to Sahiwal to collect land taxes. In 1849, the Sahiwal district was formed with its headquarters in Pakpattan. In 1852, the district was expanded to include an area east of the Ravi river, the "trans-Ravi portion". The district headquarters were moved to Gogera.