In 1388, the leading men of Sweden and Queen Margareta had a meeting at the Castle of Dalaborg on the lake Vänern. The Swedes wanted Queen Margareta to dethrone the King, Albrekt of Mecklenburg, whom they did not like. An army was mobilized, and there was a battle. King Albrekt mocked Queen Margareta by calling her "King Trouserless" and sending her a whetstone. This was supposed to mean that he thought that she should rather stay at home and sharpen her needles than leading an uprising. After much fighting in various parts of the country, there was a final battle in Falköpng in February, 1389. During this attack, many men were killed. Queen Margareta ´s troops eventually defeated those of King Albrekt. Albrekt was captured and was taken to Copenhagen, where he was brought around in the streets, wearing a fool ´s cap, before being sent to prison.
Queen Margareta was now 36 years old and the Queen of Sweden, Norway and Denmark. She was a strong, stubborn and talented woman who was at the peak of her career. There was one problem, though. Since her son Olaf was dead, she needed an heir. She chose a young male relative, little Bogislav from Pommern, who was her sister ´s nephew and had recently lost his mother. Bogislav was re-christened Erik, which was thought to be a more suitable name for a king. Erik was elected King of Norway, and the coronation took place in Trondheim in 1392. A few years later, he was crowned King of Sweden as well. This coronation took place in the huge Nicolai Church in Kalmar, in the summer of 1397.