In 1812 Napoleon's troops invaded Russia and the Prussian units under the leadership of the field marshal Yorck occupied Courland and approached Riga and the Battle of Mesoten was fought. Napoleon proclaimed restoration of Duchy of Courland and Semigallia under French and Polish protectorate. The Russian governor-general of Riga Ivan Essen was expecting attack, and set the wooden houses of Riga suburbs on fire to deflect the invaders leaving thousands of city residents homeless. However, Yorck did not attack Riga and in December the Napoleon's army retreated.