 Costa Rica was sparsely inhabited by indigenous peoples before coming under Spanish rule in the 16th century.It remained a peripheral colony of the empire until independence as part of the First Mexican Empire, followed by membership in the United Provinces of Central America, from which it formally declared independence in 1847.Following the brief Costa Rican Civil War in 1948, it permanently abolished its army in 1949, becoming one of only a few sovereign nations without a standing army.