the Swedish government. However, as late as the 16th century, reigns of Kings Eric XIV and John III, whose Swedish government often travelled with them elsewhere (see below), the city was still not what could be called a national capital in modern terms. During the Kalmar Union (1397–1523), controlling Stockholm was crucial to anyone aspiring to control the kingdom, and the city was consequently repeatedly besieged by various Swedish-Danish factions. In 1471, Sten Sture the Elder defeated Christian I of Denmark at the Battle of Brunkeberg only to lose the city to Hans of Denmark in 1497. Sten Sture managed to seize power again in 1501 which resulted in a Danish blockade lasting 1502–1509 and eventually a short peace. Hans' son Christian II of Denmark finally conquered it in 1520 and had many leading nobles and burghers of Stockholm beheaded in the so-called Stockholm Bloodbath. When King Gustav Vasa finally besieged and conquered the city three years later, an event which ended the Kalmar Union and the Swedish Middle Ages, he noted every second building in the city was abandoned. By the end of the 15th century, the population in Stockholm can be estimated to 5,000–7,000 people, which made it a relatively small town compared to several other contemporary European cities. On the other hand, it was far larger than any other city in Sweden. Many of its inhabitants were Germans and Finns, with the former forming a political and economic elite in the city. During the Middle Ages, export was administered mostly by German merchants living by the squares Kornhamnstorg ("Grain Harbour Square") and Järntorget ("Iron Square") on the southern corner of the city. Regional peasantry supplied the city with food and raw materials, while the craftsmen in the city produced handicrafts, most of whom lived by the central square Stortorget or by the oldest two streets in Stockholm, the names of which still reflects their trade: Köpmangatan ("Merchant Street") and Skomakargatan ("Shoemaker Street") in the central part of the city. Other groups lived by the eastern or western thoroughfares, Västerlånggatan and Österlånggatan. Early Vasa era After Gustav Vasa's siege of Stockholm, he restored the privileges of the city which was beneficiary to the burghers of the city. The king maintained his control over the city by controlling the elections of aldermen and magistrates. By the mid-century, the numbers of officials increased in order to make the management of