In colonial times Bolivia was the Audiencia of Charcas, an administrative division of the Viceroyalty of Peru. On August 17, 1825, eleven days after independence from Spain was proclaimed, Bolivia adopted its first national flag. It consisted of red and green stripes with a yellow star on the red, surrounded by a green wreath. (A competing flag design in 1825–26 also showed red, green, and yellow, but, rather than one star, it included five stars within wreaths.) The three colours had been widely used (for example, in clothing) by the Aymara and Quechua peoples, who dominated the area before the arrival of the Spanish conquerors. The colours also have been associated with the valour of the army (red), the richness of mineral resources (yellow), and the fertility of the land (green). There may be a connection with the yellow, blue, and red striped flag of “The Liberator,” Simón Bolívar, which formed the basis for the flags of Colombia, Ecuador, and Venezuela.
The Bolivian flag adopted on July 25, 1826, had horizontal stripes of yellow-red-green with a coat of arms in the centre. On November 5, 1851, the order of the stripes was changed to red-yellow-green, perhaps to increase its distinctiveness when seen at a distance. Over the years different versions of the coat of arms were introduced, and in the late 1830s Bolivia was temporarily united with Peru under a red flag with the confederation arms in the centre. The current flag law dates from July 14, 1888. The coat of arms has subsequently been modified unofficially by the addition of a 10th star. The 9 stars previously in use referred to the Bolivian departments; the 10th star symbolizes the valuable territory (and its outlet to the ocean) that was lost to Chile in the War of the Pacific (1879–84).