0 of 0

The hemispheric summit meeting that just wrapped up in Panama was the first to include the president of Cuba.

But even if Raul Castro and his brother Fidel were kept out of sight at past Summits of the Americas, they were never out of mind.

Six years ago, President Obama stood on a rooftop in Trinidad, talking with reporters about his first summit. Scott Wilson, a Washington Post correspondent with lots of Latin-America experience, asked the president what he'd learned from listening to his fellow leaders.

Obama said he'd been struck by the goodwill Cuba had won throughout the hemisphere by sending thousands of doctors to practice in other countries.

"It's a reminder for us in the United States that if our only interaction with many of these countries is drug interdiction, if our only interaction is military," Obama said, "then we may not be developing the connections that can, over time, increase our influence."

Six years later, Obama has taken that lesson to heart.

There was less talk about the drug trade at this summit, and more talk about airplane sales. Obama boasted that U.S. trade with the rest of the hemisphere has grown more than 50 percent since he came into office.

He repeatedly talked about the $1 billion aid request in his budget to help Central America foster economic opportunity as an alternative to the violent underground.

And he talked up his executive action — currently in legal limbo — to protect those who immigrated illegally to the U.S. from Latin America and elsewhere from deportation. Panamanian President Juan Carlos Varela, who hosted the summit, said that would play a big role in Obama's ultimate legacy.

Obama is also promoting cheaper, cleaner energy in Latin America and the Caribbean. And he spoke with his fellow leaders about ways to improve infrastructure — both physical and digital.

"The United States is more deeply engaged across the region that we have been in decades," Obama said Saturday on the closing night of the summit. "We're focused on the future and what we can build and achieve together."

Of course, the most visible symbol of that newfound engagement is Obama's decision to seek normal diplomatic relations with Cuba after a half-century of official hostility. The diplomatic thaw was unanimously applauded by leaders from across the hemisphere and across the political spectrum.

"At this summit, it's the most important event," Colombian President Juan Manuel Santos said. "Everybody south of the Rio Grande has appreciated this tremendous step and is very enthusiastic about what this is going to mean for the future of our relations."

Leftist leaders also celebrated Cuba's inclusion at the summit, even as they continued to complain about past abuses by the United States. Many of the events they cited took place before Obama was born.

"I always enjoy the history lesson," Obama said wryly during the summit's long-winded plenary session.

"I'm certainly mindful that there are dark chapters in our own history," he said. But while bashing the U.S. may serve some leaders' political needs, Obama added, "that's not going to bring progress. That's not going to solve the problems of children who can't read, who don't have enough to eat. It's not going to make our countries more productive or more competitive in a global economy."

Cuban President Raul Castro delivered one of the longer indictments of past U.S. policy during the summit. But afterward, Obama said, he had a "candid and fruitful" conversation with the Cuban leader, offering the possibility of moving the two countries' relationship in a "different and better direction."

"Cuba is not a threat to the United States," Obama said. While the two countries will still have serious differences, "there are going to be areas where we cooperate as well."

Once again, he brought up those globetrotting Cuban doctors, saying they "made a difference" in West Africa, battling the recent Ebola outbreak.

Obama's foreign policy has been tested repeatedly over the past six years, and often it has collided with harsh reality in places like Syria, Yemen and Ukraine.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.