The flag was officially adopted on November 27, 1906, including a slight modification to the placement and design of the entrenched coat of arms. The flag was updated to reflect concurrent modifications to the national coat of arms in 1964 and 1998.
During most of its colonial period, Costa Rica was the southernmost province of the Captaincy General of Guatemala, which was nominally part of the Viceroyalty of New Spain (i.e., Mexico), but which in practice operated as a largely autonomous entity within the Spanish Empire. As such, the land of present Costa Rica was covered by the various flags of the Spanish and Mexican Empires until 1823.
Costa Rica was part of the Federal Republic of Central America (originally known as the "United Provinces of Central America"), a sovereign state in Central America, which consisted of the territories of the former Captaincy General of Guatemala. A republican democracy, it existed from July 1823 to 1841. During this period, Costa Rica used the flag of the United Provinces of Central America, augmented by variations specific to the State of Costa Rica within the United Provinces of Central America (a blue and white striped United Provinces flag, with the Costa Rican State Seal added).
When the Federal Republic of Central America unofficially dissolved by 1841, Costa Rica made a further modification to its specific variation of the United Provinces of Central America flag.
The coat of arms of Costa Rica was also revised in 1848 and placed in the center of the flag. In 1906, when the coat of arms was modified, the update was placed in a white disk on the flag's red stripe, and later on an oval, set toward the hoist.
The coat of arms depicts the isthmus between the Pacific ocean and the Atlantic Ocean, with 3 volcanoes. The 7 stars stand for the 7 provinces of Costa Rica. The Spanish name of the country is scrolled on a white banner, Republica de Costa Rica (Republic of Costa Rica), and the Central American union is recognized in the blue upper scroll, America Central, recalling the former United Provinces of Central America.