Alajuela is the city almost every traveler to Costa Rica passes through, sometimes without realizing it: Juan Santamaría International Airport, the country's main air gateway, sits in its territory. Many use it as little more than a place to sleep on arrival or departure, but the 'City of Mangoes' deserves at least an unhurried walk. Its central park, shaded by huge century-old mango trees, beats with the small-town rhythm of the Central Valley: retirees chatting on the benches, shoeshiners, fruit vendors, and the white cathedral with its red dome presiding over it all.
Alajuela is also 'La Heroica', birthplace of national hero Juan Santamaría, the humble drummer boy who, according to tradition, set fire to the inn where William Walker's filibusters were holed up at the battle of Rivas (1856), dying in the attempt. His figure and his feat are at the heart of Costa Rican identity, and the city honors him with a history museum, a monument and a celebration every April 11.
This guide covers Alajuela with a practical eye: what to see in its town center, how to use its strategic location to visit Poás Volcano and the Central Valley towns, how to get around and where to stay. With its warm climate, its closeness to the airport and its relaxed character, Alajuela is an excellent starting point —or closing point— for a trip through Costa Rica.
The region of today's canton of Alajuela was settled before the arrival of the Spanish by Indigenous peoples of the Central Valley, whose lands were later parceled out among colonists. Hispanic settlement took hold in the 18th century: in 1782 a chapel was blessed at the spot known as La Lajuela —from which the name Alajuela would derive—, and the hamlet grew up around it. The settlement was granted the title of villa on December 18, 1813 (under the name Villa Hermosa, later San Juan Nepomuceno de Alajuela) and that of city on November 20, 1824, during the first years of the newly independent Costa Rica. Alajuela played a singular role in the contest among the Central Valley cities over which would be the capital: its forces took part in the battle of Ochomogo (1823), and for a time it aspired to regional primacy. But its place in national history was sealed in 1856, during the National Campaign against the American filibuster William Walker. At the second battle of Rivas, in Nicaragua, a young man from Alajuela of humble origins, Juan Santamaría, volunteered to set fire to the inn where the invaders were entrenched, a feat that changed the course of the fight and cost him his life. Turned into a national hero, he gave Alajuela the nickname 'La Heroica'. Through the 19th and 20th centuries, the city grew as the farming and coffee-growing center of the Central Valley, and with the opening of the international airport —which bears the hero's name— it became the country's main gateway. The full story is on our history page.
Read the full history ↓No exact prices: a scale from $ (budget) to $$$$$ (luxury), with 2-3 options per category.
Origins, formation and what the sources say.
The name Alajuela comes from a small feature of the terrain and from popular speech. The area where the city grew was known in the 18th century as 'La Lajuela', a diminutive that would refer to the lajas or flat stones of a local stream or gully, or to a spot of small flat stones. Over time, pronunciation and spelling turned 'La Lajuela' into 'Alajuela', joining the article to the noun, a common phenomenon in the formation of many place names.
Settlement of the region took hold toward the end of the 18th century. In 1782 a chapel was raised on the site, and around it grew the hamlet of settlers working the farmland of the fertile Central Valley. For a time the place was also known by religious devotions linked to that chapel, but the geographic name that ended up prevailing, and that persists to this day, was the one derived from 'La Lajuela'.
That humble, rural root marks the city's character: Alajuela was born as a farming settlement of the Central Valley, far from colonial pomp, and for centuries it kept the provincial, hard-working air you can still breathe in its central park of mango trees.
Before the arrival of the Spanish, Costa Rica's Central Valley was inhabited by Indigenous peoples who practiced agriculture, organized in chiefdoms. The conquest and the Spanish colonization that followed —slow and short of resources in this marginal province of the Empire— gradually displaced and reduced those original populations, while the valley's lands were parceled out among colonists for farming.
For much of the colonial period, the center of power was Cartago, the capital. But through the 18th century new settlements appeared in the Central Valley as farming —especially tobacco and later coffee— drew people in: Heredia, San José and Alajuela itself. The 1782 chapel was the seed of the Alajuela settlement, which grew fast thanks to the fertility of its land and its position in the valley.
Alajuela was given the rank of villa on December 18, 1813 —at the urging of Florencio del Castillo, the Costa Rican deputy at the Cortes of Cádiz—, first as Villa Hermosa and then as San Juan Nepomuceno de Alajuela. With Central America's independence from Spain in 1821, and the formation of the State of Costa Rica, the villa made its definitive leap: on November 20, 1824 it obtained the title of city, joining the four great urban centers of the Central Valley that would contest the leadership of the emerging nation.
After independence in 1821, Costa Rica went through a period of tension among the main Central Valley cities over the country's political direction and the seat of the capital. Cartago, the old colonial capital, leaned toward annexation to Iturbide's Mexican Empire and a more conservative model; San José and Alajuela, by contrast, defended more liberal and republican positions and pushed for moving the seat of power.
That rivalry broke out at the battle of Ochomogo, in 1823, fought on the heights that separate the Cartago valley from that of San José. In that clash, the forces of San José and Alajuela defeated those of Cartago and Heredia, and as a result the capital of Costa Rica moved from Cartago to San José, which has kept it ever since.
Alajuela was thus on the winning side in the definition of the new order, consolidating itself as one of the key cities of the Central Valley. Although it did not become the capital, its political and demographic weight kept growing, and the province of Alajuela became one of the largest in the country, stretching from the valley to the northern lowlands.
The episode that sealed Alajuela's place in national history forever was the National Campaign of 1856-1857, the war in which Costa Rica and the other Central American countries faced the American filibuster William Walker, who intended to seize the region and even reinstate slavery. Walker had taken power in Nicaragua, and Costa Rica, under president Juan Rafael Mora, declared war and sent an army to fight him.
The most famous moment came at the second battle of Rivas, on April 11, 1856, on Nicaraguan soil. The filibusters had entrenched themselves in a fortified inn, from which they held off the Costa Rican attack. To dislodge them, the building had to be set on fire, an almost suicidal mission. According to tradition, a young and humble soldier from Alajuela, Juan Santamaría, nicknamed 'El Erizo', volunteered to carry the torch. He managed to set the inn alight, deciding the fight in favor of the Central American forces, but he was shot down in the attempt.
His sacrifice made him Costa Rica's national hero. Although some details of the account have been debated by historians —given how few direct sources there are—, his figure took hold as a symbol of patriotism and of the humble people who defended sovereignty. Alajuela, his home city, took the nickname 'La Heroica', raised a monument to him and gave his name to the history museum and, later, to the country's international airport. Every April 11 is a national holiday in his memory.
Through the 19th century, coffee transformed Costa Rica and, with it, Alajuela. The slopes of the Central Valley turned out to be ideal for growing the 'golden bean', which became the country's main export and paid for much of its modernization. Alajuela, ringed by coffee farms, prospered as a center of agricultural production and trade, and its population grew steadily.
Coffee wealth made it possible to put up public buildings, churches and infrastructure. Alajuela Cathedral, with its characteristic red dome, and the civic spaces of the center largely date from that boom period. The city was hit, like the whole region, by the earthquakes typical of a valley ringed by active volcanoes, which forced churches and buildings to be rebuilt on several occasions.
In the 20th century, Alajuela consolidated its position as the country's second city. But the great leap in its international profile came with the construction of the international airport in its territory, named Juan Santamaría in honor of the local hero. That terminal turned Alajuela into Costa Rica's main gateway, through which millions of visitors now pass, drawn by the country's nature.
Today Alajuela combines its heroic, coffee-growing past with its role as Costa Rica's great gateway. Juan Santamaría International Airport, in its territory, takes most of the country's international flights, so almost every traveler arriving in Costa Rica sets foot, if only in passing, on Alajuela soil. That's why the city has developed a substantial offer of hotels and tourism-oriented services.
Beyond the airport, Alajuela keeps its identity as a provincial city: the central park shaded by mango trees, the red-domed cathedral, the museum and the monument to Juan Santamaría, and a town center with an unhurried rhythm. Its warm climate, being at a lower altitude than San José, and its people make it a pleasant stopover.
As the seat of one of the largest and most diverse provinces in the country, Alajuela is also the natural base for exploring the Central Valley and the north: Poás Volcano, La Paz Waterfall Gardens, the craft town of Sarchí with its World Heritage oxcarts, the coffee farms and, farther off, La Fortuna and Arenal. 'La Heroica' and 'City of Mangoes' remains, for many, the real starting point of the Costa Rican adventure.