Until the 19th century Europe had many independent city-states with ruling dynasties and local symbols, but most were absorbed by the great unification movements that created modern Germany, Italy, and other nations. Monaco managed to preserve its independence, and it adopted a law on April 4, 1881, establishing its national flags, which are in use today.
The complex princely coat of arms, whose chief design elements date back hundreds of years, is represented in full on a white flag for display on government buildings. The shield in the princely arms, from which the livery colours are derived, consists of alternating red and white lozenges, or diamonds. As is the case with many heraldic devices, the original meaning of the lozenges is not clear.
The national flag for use by private citizens, also flown at the United Nations to represent Monaco, presents the livery colours derived from the coat of arms. It is a simple horizontal bicolour of red over white, a traditional use of heraldic colours. Their use can be dated back at least to 1339, although early Monegasque flags displayed many graphic variations. The similarity of the flag of Monaco to that of Indonesia is purely coincidental.