In 1798, fearing that Napoleon's expedition to Egypt might present a threat to British interests in India, the Company's Directors accepted a suggestion to establish a Residency in Baghdad.
However, various circumstances rendered him largely ineffective, except in arranging for the Company's overland mail to use a more secure and less expensive route through Baghdad instead of across the desert from Aleppo.
Subsequently, he was appointed envoy extraordinary and minister plenipotentiary to the court of Persia, where he remained four years from 1807 to 1811.
In 1838, his Letter on the Present State of British Interests and Affairs in Persia, addressed to the Marquis of Wellesley.
In 1843, he pleaded the cause of the ameers of Sind in a letter to the court of directors of the East India Company, denouncing the latter's policy of annexation and conquest.