Before dining with Costa Rican President Laura Chinchilla and leaders of several other Central American nations who are in San Juan for an economic and political meeting, Obama said while he was technically on hand as an observer to hear their concerns, he appreciated their willingness to indulge him by allowing him to speak.
"We need to think about investments in our infrastructures ... all of which can allow for more trade, more growth, more jobs," Obama said.
"If the hemisphere is working effectively together, all of us benefit. If we're not, then we will lose in that competition to other regions."
Obama addressed the issues of energy and climate change, which he said "everybody has to be concerned about."
"My concern is helping every country at this table reduce its energy costs, making its economy more efficient, because when you have high power costs, that's not only a tax on your citizens effectively, but that's also a situation that impedes growth over the long term," he said.
He also stressed the importance of education.
"If we don't have the best trained workers in the world ... then we're going to lose," he said. "Everything to train our young people ... and pool our resources ... will end up benefiting everybody."
Obama also address drug trafficking and its effect on citizen safety.
"Obviously that's something that's important, during this trip I've tried to make the point that we're interested in cooperating with every country around issues of citizen security, we know what a major toll it's taken, we are obviously deeply concerned about narco-trafficking and the drug trade," the American president said.
"We can't just have a law enforcement only approach, we have to have a prevention approach, we have to have an education approach, we have to think creatively."
The leaders dined in the National Theater, a baroque, colonial building adorned with gold leaves and a painted ceiling. The menu was "New Costarican fusion cuisine" that featured green tomatoes and avocado tartar with red tomato jelly, and shrimp with truffles in olive oil; cream of pejibaye (local palm fruit) with samplings of lobster and confetti of sweet chile; and salmon medallions with green sauce, sweet corn terrine and vegetables. There also was French wine.
The group included Central American Integration System Secretary-General Juan Aleman, Panamanian President Ricardo Martinelli, Honduran President Porfirio Lobo, El Salvadorean President Mauricio Funes, Belize Prime Minister Dean Barrow, Guatemalan President Otto Perez, Nicaraguan President Daniel Ortega and Dominican Republic President Danilo Medina.
Haiti's president was not expected to attend Central American economic and political organization's gathering.
Costa Rican Foreign Minister Enrique Castillo told CNN en Espanol regional leaders saw "indifference" to the region during Obama's first term in the White House.
"This gesture of coming to Costa Rica and meeting with the Central American presidents is a change," Castillo said.
Thousands were on hand as Air Force One landed at the airport in San Jose, and large crowds lined the streets despite the threat of rain as the president's motorcade headed for a hotel, where Obama met with U.S. Embassy personnel.
Obama, who spent Thursday night in Mexico City after meeting with President Enrique Pena Nieto, traveled to Costa Rica after delivering remarks at Mexico's National Museum of Anthropology, which contains artifacts from Mexico's pre-Columbian heritage, and meeting with Mexican entrepreneurs.
In meeting with Pena Nieto Thursday, Obama offered his support for Mexico's shifting security strategy as he called for a greater focus on economic ties.
Pena Nieto is revamping his law enforcement bureaucracy, which U.S. officials say could limit coordination with U.S. agencies.
Mexico has placed new restrictions on intelligence-sharing with the United States, pulling back on the extraordinary access the previous Mexican administration gave U.S. authorities in prosecuting the drug war and organized crime.
Mexican officials deny the changes will lessen Mexico's coordination and cooperation with U.S. law enforcement efforts.
Swim Week Miami Beach 2014 [PHOTOS]