Costa Rica gained independence from Spain on September 15, 1821. The country was part of the Captaincy General of Guatemala, which was a Spanish colonial administrative unit that included much of Central America. Costa Rica declared its independence from Spain on September 15, 1821, along with the other provinces of the Captaincy General. The independence was recognized by Spain on April 11, 1823.
Today, September 15 is celebrated as Independence Day in Costa Rica. It is a national holiday and is marked with parades, concerts, and other festivities throughout the country.