Liberia () is a district and the largest city in the Guanacaste Province of Costa Rica, located northwest of the national capital, San José, in the canton with the same name, of which it is the head city or capital. It is a major center for the country's tourism industry. Liberia has been nicknamed la ciudad blanca (the white city) due to the white gravel that was once used to make the city's roads and the whitewashed colonial houses which used to make up a large part of the city. It had a population of 56,899 in 2013. History Modern-day Liberia was founded as a hermitage without any legal or formal act of foundation on 4 September 1769. It was located in a strategic location where the roads from the towns of Rivas, Bagaces, and Nicoya met. The hermitage was used primarily as place of rest by travelers. The area's giant guanacaste trees provided shade for travelers and livestock and over time the area became known as Guanacaste (El Poblado de Guanacaste). The settlement itself shared a history with Nicaragua and Costa Rica. In 1812 the Cortes of Cádiz created a single autonomous province, covering Nicaragua and Costa Rica, with its capital in León. Nicaragua and Costa Rica achieved independence from Spain on 15 September 1821 after the Spanish defeat in the Mexican War of Independence. After the short-lived First Mexican Empire (1821–1823), Costa Rica (considered a minor provincial outpost at the time) became part of the newly formed Federal Republic of Central America in 1823. The Partido de Nicoya (Nicoya's Party) served as an administrative unit for the Federal Republic of Central America. The Partido de Nicoya comprised much of the territory that today is the province of Guanacaste, Costa Rica. Most of the area, such as the settlements of Nicoya and Santa Cruz, held economic ties to Costa Rican territory such as the growing port of Puntarenas. The settlement of Guanacaste (modern day Liberia), on the other hand, held closer economic ties to Nicaraguan territory like the town of Rivas. Under the leadership of the villages of Nicoya and Santa Cruz, the Partido de Nicoya voted to annex themselves to Costa Rica on 25 July 1824. The inhabitants of Guanacaste (modern day Liberia) chose to continue to be part of Nicaragua in 1824. In 1826, after years of dispute, the congress of the Federal Republic of Central America