According to legend, in 832 AD, a Pictish King, Angus Mac Fergus was praying for guidance prior to a battle against a superior invading army of Angles and Saxons under a leader called Athelstan. He saw a white cloud in the form of a saltire cross against the blue sky above him and vowed that, should he be victorious and his men saved, he would ensure St. Andrew was commemorated as our national saint.
He duly won the battle and mindful of his vow, he decreed that Andrew would be patron saint of Scotland and the Saltire our national flag. Andrew was officially named the patron saint of Scotland in the Declaration of Arbroath in 1320 and the Saltire became the national flag in an Act of Parliament in 1385