The flag of Sweden is blue with a yellow Scandinavian cross that extends to the edges of the flag. The design and colors of the Swedish flag are believed to have been inspired by the present Coat of arms of Sweden of 1442, which is blue divided quarterly by a cross pattee of gold and modeled on the Danish flag. Blue and yellow have been used as Swedish colors at least since King Magnus Birgersson's royal coat of arms of 1275.
According to the mythology, the Swedish 12th-century king Eric the Holy saw a yellow cross in the sky as he landed in Finland during the First Swedish Crusade in 1157. Seeing this as a sign from God he adopted the yellow cross against a blue background as his banner.
It has also been suggested that the Swedish flag might have been a resistance flag against the Danish flag, which is red with a white cross, and which has been known since 1219. According to this theory, the Swedish flag was created during the reign of King Charles Knutsson, who also introduced the Coat of arms of Sweden in 1442. The national coat of arms is a combination of King Albert of Mecklenburg's coat of arms of 1364 and King Magnus Birgersson's coat of arms of 1275 and is blue divided quarterly by a golden cross pattée.
Other historians claim that the Swedish flag was blue with a white cross before 1420, and became blue with a golden cross only during the early reign of King Gustaf Vasa, who successfully liberated Sweden from the temporary tyranny of the Danish King Christian II in 1521.