A state flag is a variant of a national flag (or occasionally a completely different design) specifically designated and restricted by law or custom (theoretically or actually) to use by a country's government or its agencies. For this reason they are sometimes referred to as government flags. In many countries the state flag and thecivil flag (as flown by the general public) are identical, but in other countries, notably those in Latin America, central Europe, and Scandinavia, the state flag is a more complex version of the national flag, often featuring the national coat of arms or some other emblem as part of the design. Scandinavian countries also useswallowtailed state flags, to further differentiate them from civil flags.
In addition, some countries have state ensigns, separate flags for use by non-military government ships such as guard vessels. For example, government ships in the United Kingdom fly the blue ensign.
State flags should not be confused with the national flag as used by military organisations; these are referred to as war flags and naval ensigns.