He later obtained naturalization as a British citizen, and entered the military service of the East India Company.In 1861 he was appointed an assistant commissioner in the Punjab region of British India, and in 1877 became deputy commissioner of Peshawar (now in Pakistan) and took part in several expeditions against the Pathan tribes.