Of all Brandenburg-Prussian territories, the Electorate of Brandenburg was among the most devastated at the end of the Thirty Years' War. Already before the war, the population density and wealth in the electorate had been low compared to other territories of the empire, and the war had destroyed 60 towns, 48 castles and about 5,000 villages. An average of 50% of the population was dead, in some regions only 10% survived. The rural population, due to deaths and flight to the towns, had dropped from 300,000 before the war to 75,000 thereafter. In the important towns of Berlin-Cölln and Frankfurt an der Oder, the population drop was one third and two-thirds, respectively. Some of the territories gained after the war were likewise devastated: in Pomerania, only one third of the population survived, and Magdeburg, once among the wealthiest cities of the empire, was burned down with most of the population slain. Least hit were the Duchy of Prussia, which was only peripherally involved in the war, and Minden.