However, he was soon again accepted into active service and appointed as Inspector of the Cavalry and the commander of the Household Troops of Horse Regiment. He was rapid in acquiring the sovereign's confidence. Enjoying the unlimited favor of Pavel I, for three years (1798–1801) he served as the military governor of Saint Petersburg, the governor of the Baltic provinces, the inspector of 6 military districts, the Grand Chancellor of the Maltese order, the chief director of mail, a member of the Imperial Council and of the Board of Foreign Affairs.