During his announcement on Wednesday, President Obama said a transformation of relations with Cuba would bring opportunities for both countries. (AP)

The United States and Cuba ended more than a half-century of enmity Wednesday, announcing that they would reestablish diplomatic relations and begin dismantling the last pillar of the Cold War.

The historic move, following 18 months of secret negotiations and finally made possible by Cuba’s release of detained U.S. aid contractor Alan Gross, fulfilled one of President Obama’s key second-term goals.

The decision is likely to reverberate across many political frontiers where the standoff between Washington and Havana has played a role — including across much of Latin America, where U.S. policy on Cuba has long been a source of friction.

“These 50 years have shown that isolation has not worked,” Obama said in a televised, midday address. “It’s time for a new approach.”

Saying that he was “under no illusion about the continued barriers to freedom that remain for ordinary Cubans,” Obama said he was convinced that “through a policy of engagement, we can more effectively stand up for our values and help the Cuban people help themselves.”

In simultaneous remarks in Havana, Cuban President Raúl Castro affirmed his government’s willingness for dialogue on “profound differences” between the countries, “particularly on issues related to national sovereignty, democracy, human rights and foreign policy.”

Castro said that “Obama’s decision . . . deserves the respect and acknowledgment of our people.”

Obama and Castro — who spoke by phone Tuesday, the first such exchange between leaders of the two countries since the 1959 Cuban revolution — thanked Pope Francis and the Vatican, which they said were instrumental in promoting their dialogue, and the government of Canada, where secret talks that began in June 2013 were held.

In addition to reopening an embassy in Havana, the administration plans to significantly ease trade and financial restrictions, as well as limits on travel by Americans to Cuba, by using its regulatory and enforcement powers to evade limits imposed by a congressionally mandated embargo.

Americans will be permitted to send more money to Cuban nationals, use their debit and credit cards in Cuba, and bring $100 worth of Cuban cigars into this country. U.S. exports to Cuba will be made easier, and additional items will be authorized. U.S. banks will be allowed to open correspondent relations with banks in Cuba.

The administration also said it would launch a review of Cuba’s status as a state sponsor of terrorism, a designation it feels Havana may not deserve alongside Sudan, Syria and Iran, and would work with Congress to ultimately lift the trade embargo and other sanctions.

While Obama said the Cubans had also agreed to expand Internet access and other freedoms, and to release 53 political detainees, Castro did not mention any of those measures in his televised speech. Coverage of the momentous announcement in Cuba’s Communist Party media was limited to the reestablishment of diplomatic relations and the release of three Cuban spies imprisoned in the United States.

Where U.S.-Cuba relations stand and what may change

In addition to Gross, who the Obama administration said was freed on humanitarian grounds after five years, the United States exchanged the three Cubans for an unnamed U.S. intelligence asset said to have been held in Cuba for two decades.

The inclusion in the deal of the U.S. spy, a Cuban national, appeared to have been the break that allowed it to go through. Cuba had long offered to release Gross in a swap for its imprisoned intelligence agents; the administration had long refused on the grounds that Gross, a subcontractor working for the U.S. Agency for International Development, was not a spy and should be released without conditions.

Gross left Cuba on Wednesday morning aboard a U.S. government aircraft, accompanied by his wife and several members of Congress who had long pushed for his release. Despite concerns about his increasingly ill health, he appeared relatively healthy, albeit significantly slimmer than at the time of his arrest and missing several teeth he said he had lost in prison.

“What a blessing it is,” Gross, a Maryland resident, said at a hastily arranged Washington news conference. “Thank you, President Obama, for everything you have done today and leading up to today.”

Obama’s decision to go far beyond a deal to bring Gross home and declare an end to the estrangement between the countries was rooted in the long-term strategic goal of eliminating what he called an outdated policy that “has had little effect beyond providing the Cuban government with a rationale for restrictions on its people.”

“Today,” Obama said, “Cuba is still governed by the Castros and the Communist Party that came to power half a century ago.”

The White House also said that the U.S. stance against Cuba alienated Washington from “regional and international partners.” That alienation has been particularly apparent in Latin America, which long ago rejected U.S. insistence that it continue isolating Cuba. One senior administration official described U.S. policy on Cuba as “an albatross around the neck of the United States in the hemisphere and around the world.”

Debate at the last Summit of the Americas, held in 2012 in Colombia, was dominated by criticism of the U.S. stance on Cuba. Ejected from the Organization of American States at U.S. urging in 1962, Cuba has been invited to attend the next summit, in April, by Panama, the host government. Obama also plans to attend.

Many Republicans were sharply critical of what House Speaker John A. Boehner (R-Ohio) called Obama’s “mindless concessions” to Cuba and what others referred to as “appeasement.”

Sen. Robert Menendez (N.J.), the Democratic chairman of the Senate Foreign Relations Committee and one of several Cuban American lawmakers to denounce the deal, said it will “invite further belligerence toward Cuba’s opposition movement and the hardening of the government’s dictatorial hold on its people.”

Sen. Marco Rubio (R-Fla.) called the announcement “just the latest in a long line of failed attempts by President Obama to appease rogue regimes at all cost.”

But Democrats generally, and some Republicans, applauded the moves.

“Having diplomatic relations is far more likely to achieve the ends that we seek than trying to cook up programs like the one that ultimately got [Gross] in prison,” said Sen. Jeff Flake (R-Ariz.). Gross was sent to Cuba to secretly distribute Internet equipment to Jewish community groups, part of a congressionally mandated program to encourage Cuban democracy.

Administration officials said that the reestablishment of relations was a “reciprocal” decision by both countries. But measures to expand commerce and Cuban American contacts, they said, were not “concessions” but unilateral decisions they believe will better accomplish U.S. goals of promoting democracy and openness in Cuba.

The officials said that they did not expect a strongly negative U.S. public reaction to the moves, citing changes in the political sentiments of a new generation of Cuban Americans.

In Cuba, church bells rang throughout Havana as the two presidents delivered their simultaneous addresses.

“Finally!” said Joseph Carlos Quintero, cheering the normalization announcement with fellow students on the University of Havana campus. Saying the vast majority of Cubans were “ecstatic” at the news, Quintero said that any thaw between the two countries would mean more money and more visits from Cubans in the United States.

“Everyone is talking about this right now,” Aline Rodriguez said as she stood in a long line for ice cream in Havana’s Coppelia Park. “And everyone is happy.”

The deal is a major diplomatic victory for Castro, 83, who has said he will step down in 2018.

Since taking over in 2006 from his ailing older brother Fidel — now 88 and all but disappeared from public life — Castro has repeated an offer to engage in direct conversations with Obama “as equals,” saying any issue would on the table.

But just as Obama’s hands were tied by the imprisonment of Gross, Cuba insisted that there would be no improvement of relations without the release of the imprisoned Cuban intelligence agents that Havana has championed as “anti-terrorism” heroes. The three were part of a group of five spies who were sent by Cuba in the 1990s to infiltrate anti-Castro exile groups in Miami.

After a series of hotel bombings in 1997 by anti-Castro militants targeting the island’s burgeoning tourism industry, Fidel Castro authorized Cuban officials to release information on the militant groups to U.S. investigators.

But the information Cuba provided helped American law enforcement detect the presence of the spies, ultimately leading to their arrests in 1998 and subsequent U.S. prison sentences. Fidel Castro was said to be personally anguished by their fate.

Gross, who was arrested in 2009, quickly became a bargaining chip. Convicted for “crimes against the state,” he was sentenced to 15 years and jailed at a military hospital. In recent months, he had refused medical care and diplomatic visits while threatening to take his own life.

Two of the five Cuban prisoners had already served much of their terms in prison and been released to Havana. The Justice Department said that Obama had commuted the sentences of the remaining three and that they had been delivered to Cuba by the U.S. Marshals Service.

Nick Miroff in San Diego and Maya Albanese in Havana contributed to this report.