 Legally, the countries remained separate sovereign states, but with their domestic and foreign policies being directed by a common monarch.Gustav Vasa's election as king on 6 June 1523 and his triumphant entry into Stockholm eleven days later marked Sweden's final secession from the Kalmar Union.The union was the work of Scandinavian aristocracy wishing to counter the influence of the Hanseatic League.