In 1812, during Napoleon’s invasion of Russia, Prussian troops led by Field Marshal Yorck entered Courland (western Latvia) and advanced toward Riga. A key encounter took place at the Battle of Mesoten, as Napoleon's forces aimed to secure the Baltic region. In a symbolic gesture, Napoleon proclaimed the restoration of the Duchy of Courland and Semigallia under a French-Polish protectorate, attempting to revive Courland's autonomy and gain support from the local population.
Meanwhile, the Russian governor-general of Riga, Ivan Essen, braced for an attack. In a desperate move to hinder the advancing troops, Essen ordered the burning of Riga’s wooden suburbs, leaving thousands of residents homeless as flames consumed their homes. However, Yorck’s forces never attacked Riga, and the French advance toward the Baltic faltered.
By December 1812, after the disastrous failure of Napoleon’s Russian campaign, his army retreated from the region. The brief occupation of Courland ended without major territorial changes, but the destruction of Riga’s suburbs left a lasting impact on the city's population, underscoring the hardships brought to Latvia by foreign wars.