Costa Rica ( literally meaning, “Rich Coast”) is a country in Central America, bordered by Nicaragua to the north, Panama to the southeast, the Pacific Ocean to the west, the Caribbean Sea to the east, and Ecuador to the south of Cocos Island. It came under Spanish rule in the 16th century. It remained a peripheral colony of the empire until independence as part of the short-lived First Mexican Empire, followed by membership in the United Provinces of Central America, from which it formally declared sovereignty in 1847. Since then, Costa Rica has remained among the most stable, prosperous, and progressive nations in Latin America. Following a brief but bloody civil war, it permanently abolished its army in 1949, becoming the first of only a few sovereign nations without a standing army.