From July 1775 he was governor-poruchik of Tver and then from 1776 governor of Kaluga and Tula. In 1790 he was awarded the title of general-anshefa. He fought in the Polish–Russian War of 1792, commanded Russian troops in Lithuania and was appointed Governor-General of that area (then including Belarus, Lithuania, western Ukraine and part of Poland) after the First Partition of Poland, before retiring to Russia on the second partition of Poland.