SAN JOSE, Costa Rica – Eager to move the conversation beyond drugs and violence, President Obama met with Central American leaders Friday and declared that building stronger economies and greater trade ties will allow nations of the region to offer their residents a better way of life and reduce incentives to support narco-trafficking.

“We have to make sure that everybody feels opportunity,” the president declared in a joint news conference with Costa Rican President Laura Chinchilla. “Even in countries that are doing well, the scourge of drugs and drug-trafficking will still be there. And there still needs to be a strong law enforcement component. But we can do better than we are currently doing. “

The president had sounded a similar message earlier Friday in Mexico, where he cast the nation as ready to take “its rightful place in the world” and move past the drug battles and violence that have defined its relationship with the United States.

The president’s three-day visit to Mexico and Costa Rica is his first to Latin America since winning a second presidential term in an election in which he gained the support of Hispanic Americans by a large margin. His trip is being followed with great interest by Hispanics in the United States as well as in Mexico, Central America and farther to the south.

In both countries, the president said his talks with leaders focused on how to strengthen the regional economy and build trade ties, adding that the stronger that local economies are and the more opportunities that people have, “the less powerful these narco-trafficking operations are going to be.”

The president also spoke hopefully of prospects for immigration reform that he said would be a boon on both sides of the border.

Obama arrived in San Jose to a warm welcome from thousands of Costa Ricans who lined the road near the airport. Some waved American flags. Others held homemade signs, including one that said “Fired Up!” — a reference to his campaign slogan — in a much more demonstrative welcome than he had received in Mexico.

After meeting with Chinchilla, the president was meeting with leaders of the regional Central American Integration system, chaired by the Costa Rican president. The network also includes Belize, El Salvador, Guatemala, Honduras, Nicaragua and Panama.