PANAMA CITY — Turning the page on a half-century of hostility, President Barack Obama signaled Thursday he will soon remove Cuba from the U.S. list of state sponsors of terrorism, boosting hopes for improved ties as he prepared for a historic encounter with Cuban President Raul Castro.

Hours before his arrival in Panama for a regional summit, Obama announced that the U.S. State Department had finished its review of Cuba’s presence on the list, a stain on the island nation’s pride and a major stumbling block for efforts to mend U.S.-Cuba ties. Obama said he would decide quickly after receiving the formal recommendation, all but ensuring action within days.

“We don’t want to be imprisoned by the past,” Obama said during a visit to Kingston, Jamaica. “When something doesn’t work for 50 years, you don’t just keep on doing it. You try something new.”

Earlier, in Panama City, he called the list “a powerful tool to isolate countries that genuinely do support terrorism,” but he added that “as circumstance change that list will change as well.”

With his optimistic assessment, Obama sought to set the tone for the U.S. and Cuba to come closer to closing the book on more than a half-century of estrangement, when he and Castro come face to face at the Summit of the Americas. Obama was arriving Thursday evening in Panama City.

The highly anticipated interaction with Castro will test the power of personal diplomacy as the two leaders attempt to move past the sticking points that have interfered with their attempt to relaunch diplomatic relations.

The U.S. has long since stopped actively accusing Cuba of supporting terrorism, and Obama has hinted at his willingness to take Cuba off the list ever since he and Castro announced a thaw in relations in December. Yet Obama has stopped short of the formal decision amid indications that the White House was reluctant to grant Cuba’s request until other thorny issues — such as restrictions on U.S. diplomats in Havana — were resolved.

Cuba is one of just four countries still on the U.S. list of countries accused of repeatedly supporting global terrorism; Iran, Sudan and Syria are the others. The designation not only offends Cuba’s pride but also restricts Havana’s access to credit and financial systems.

Yet while recent polling has shown broad support for the thaw in both Cuba and the U.S., the change has attracted fierce opposition from some members of Congress — especially those who represent the large Cuban-American population in Florida. House Speaker John Boehner, R-Ohio, said Thursday there were “serious questions” about the wisdom of taking Cuba off the list “while this dictatorship, which practices repression at home and supports violence throughout the region, continues to hold power.”

This year’s summit is the first to include Cuba, and for Castro it’s a powerful opportunity to prove his country can be a responsible player on the world stage. Obama arrives having amassed some goodwill in Latin America by upending the U.S. policy of isolating Cuba, a policy that had irritated others in the region, and by loosening immigration policies at home.

How much face time Obama and Castro will have at the summit was unclear. Although no formal meetings were scheduled, the White House said the two would surely cross paths.

Obama and Castro shared a handshake in 2013 at Nelson Mandela’s funeral, a jarring image for those who still recall the levels of U.S.-Cuban antipathy during the Cold War.

While in Panama, Obama was to meet Friday with Panamanian President Juan Carlos Varela and other Central American leaders. He planned to speak at a forum of CEOs before joining other leaders for dinner at Panama Viejo, home to archaeological ruins dating back to the 1500s. A visit to the Panama Canal was also likely.

In a nod to lingering U.S. concerns about human rights and political freedoms, Obama is making a point to attend a forum bringing together both dissidents and members of the Cuban political establishment. On Wednesday Castro supporters aggressively heckled a group of Cuban dissidents at a civil society forum in Panama City, drawing criticism from the U.S.

Although taking Cuba off the terror list would remove one major obstacle to warming relations, Obama acknowledged that progress hasn’t been as swift as some had hoped.

Both nations called in December for quickly reopening embassies in each other’s capitals — hopefully in time for the summit. That hasn’t materialized, in part due to disagreements about U.S. diplomats’ freedom of movement in Havana. The U.S. sees those restrictions as an attempt to stifle dissent by limiting Americans’ interactions with Castro’s political opponents.

“They are proceeding as I expected,” Obama said of the talks between Havana and Washington. “I never foresaw that immediately, overnight, everything would transform itself.”

The wild card at the summit: Venezuela’s leftist President Nicolas Maduro. Obama’s recent move to slap sanctions on seven leading Venezuelan figures seemed to backfire when other Latin leaders denounced it as overkill and rallied to Maduro’s side. Maduro had said he plans to hand Obama documents with millions of signatures denouncing U.S. aggression.