The modern flag of Galicia was created in the 19th century as a copy of the naval flag of the Galician city of A Coruña. The Coat of Arms of Galicia was actually the former flag of the Kingdom of Galicia before the creation of the national flag in the 19th century.
Tradition is that the Galician emigrants to the Americas in the 19th century passsed through the port of A Coruña and thought that the A Coruña naval flag flying on the emigrant ships was the flag of Galicia. When they arrived to the new world they started flying the A Coruña naval flag, believing that it was the flag of Galicia. Years later, the flag crossed back over the Atlantic, where it was officially adopted as the new national flag of Galicia.
The Galician Law of May 29, 1984 regulates the official colours, proportions and uses of the Galician national symbols. The national symbols of Galicia are the civil flag, which is the blue and white flag, the Coat of Arms of Galicia, and the state flag, which is the result of adding the Coat of Arms over the civil flag.
"The flag of Galicia shall have the official Coat of Arms when displayed on public buildings and institutional events in Galicia", Law 5/1984 of Symbols of Galicia, Article 2.2.
Regional Flags of Spain