PUERTO VIEJO, Limón — Spice-laden chocolate bars, whisky-filled truffles and raw cacao drinks filled the tables at the Puerto Viejo Chocolate Festival this weekend. Hopeful attendants for the festival’s popular liquor and chocolate pairing called in favors and waited in long lines with the enthusiasm of super-fans trying to snag tickets to a sold-out concert.

Now in its fifth iteration, the Puerto Viejo Chocolate Festival has become the premier opportunity for southern Caribbean chocolate makers to showcase their best products. While the festival has always been a hit with locals, the festival’s reputation has begun to spread throughout Costa Rica along with the popularity of Caribbean-made cacao.

While cacao has a long history in Costa Rica, the crop’s viability in Costa Rica has declined since a deadly fungus wiped out most of the country’s plantations several decades ago. This shift was felt the most in the Caribbean lowlands, where cacao was once the main crop, and banana and pineapple began to overtake agriculture in the region. In terms of planted hectares, cacao has still not returned to its glory days, but improved cacao genetics and a growing worldwide interest in chocolate have allowed for a resurgence in the crop in Costa Rica, especially in the southern Caribbean.

“There is an increased interest in fine flavor aroma cacao,” said Paul Johnson, the owner of Caribeans, a bean-to-bar producer in Playa Cocles. “People who are sourcing high-quality cacao want it from Central and South America, so we are seeing more and more small producers from the U.S. who come here and want to source local cacao straight from the farmer.”

While Costa Rica still exports much of its cacao, there is a growing number of bean-to-bar operations creating chocolate within Costa Rica. Puerto Viejo has become ground zero for Caribbean chocolate makers, and the Puerto Viejo Chocolate Festival has become one of the region’s most important events.

While tourists still make up a large chunk of those buying Costa Rican chocolate and attending the festival, local chocolate makers are also benefiting from an artisanal food boom throughout the country. The popularity of everything from craft beer to gourmet popsicles has exploded in recent years, giving rise to hundreds of new businesses. For industry leaders and fans of the artisanal food movement, the hope is that with time the overall quality of the products will improve.

“People just want different things, to try different flavors,” said C.S. Derrick, the brewmaster at Costa Rica’s Craft Brewing Company and one of the expert judges in the Puerto Viejo Chocolate Festival’s chocolate competition. “As palates become more and more refined, tastes become more specific and discerning. After that happens, the people that aren’t doing a great job tend to go under and the people that are doing a great job tend to grow.”

Fortunately for Costa Rican chocolate makers, the cacao grown in the country is some of the best in the world. According to the International Cocoa Organization, Costa Rica is one of only nine countries in the world — and the only in Central America — that exports 100 percent fine flavor cacao.

Caribbean bean-to-bar businesses hope the country’s reputation for high-quality cacao can help create a “Napa Valley” effect in Puerto Viejo, drawing in visitors interested in sampling the area’s chocolate.

“This year at least 10 groups came from the U.S. specifically for the festival,” Johnson said. “If that can get bigger, then a place like Puerto Viejo can become known for chocolate.”