In Saint Petersburg, Derzhavin rose from the ranks as a common soldier to the highest offices of state under Catherine the Great. He first impressed his commanders during Pugachev's Rebellion. Politically astute, his career advanced when he left the military service for civil service. He rose to the position of governor of Olonets (1784) and Tambov (1785), personal secretary to the Empress (1791), President of the College of Commerce (1794), and finally the Minister of Justice (1802).