Pick up the phone, Mr. President! Make the call!” That was Alan Gross’s demand when I visited him in a Havana prison a year ago, expressing his desperation at being seemingly abandoned by the government that had sent him on a secret mission to foster regime change in Cuba.

But, unbeknownst to Gross, Obama was already working the phones—communicating with the pope, the Canadian government and Senator Patrick Leahy, among others, in a secret, high-stakes diplomatic effort to not only secure Gross’s freedom but liberate US policy from its Cold War past and finally move relations with Cuba into the modern era.

After eighteen months of back-channel diplomacy, on December 16, Obama made “the call” to President Raúl Castro—the first time US and Cuban presidents have spoken by phone since the Cuban Revolution in 1959. For forty-five minutes, the two reviewed the final details of a comprehensive deal: Cuba would set Gross free, ending five years of incarceration; the Cubans would also release Rolando Sarraff Trujillo, a CIA asset who had been in a Cuban prison for nearly twenty years for sharing intelligence with his US handlers on Cuban spying in the United States—information that had directly led to the arrest of the “Cuban Five” in September 1998. In a spy-for-spy swap, the Obama administration would set free the three remaining members of that espionage ring, known in Cuba as Red de Avispas, “the Wasp Network.”

Far more dramatically, however, the two presidents agreed to a Caribbean détente, bringing an end to the often violent hostility that has dominated US-Cuban relations for fifty-five dark years. The two nations would upgrade their “interest sections” to full embassy status and name ambassadors. The State Department would remove Cuba from its list of “state sponsors of terrorism.” Using his executive powers, Obama promised to expand the ability of US commercial interests to conduct business in Cuba, and Google would no longer be restricted on the island. Citizens of the United States would be free to travel to Cuba in far greater numbers and, for the first time, use credit cards during their trip! (Cigar aficionados will be able to buy Cohibas and Montecristos; rum drinkers can once again buy a bottle or two of Havana Club or Santiago de Cuba añejo.) In a gesture to address US concerns about human rights, the Cuban government would release fifty-two political prisoners.

“We propose to the government of the United States the adoption of mutual steps to improve the bilateral atmosphere and advance toward normalization,” said Raúl Castro when he spoke on Cuban television at noon the next day.

In the newfound spirit of equality and collaboration, Obama announced the radical change in US policy at exactly the same time. In language seldom, if ever, heard from the White House, the president bluntly characterized the abortive invasions, covert assassination plots, and ineffectual and counterproductive trade embargo as “an outdated approach that, for decades, has failed to advance our interests.” The United States, he stated in a new tone to go with the new policy, “chooses to cut loose the shackles of the past so as to reach for a better future—for the Cuban people, for the American people, for our entire hemisphere, and for the world.”

In substance and sentiment, the “new deal” between Washington and Havana is historic; it is a major breakthrough in what has been one of the most intractable foreign-policy conundrums in recent US history. “After half a century of hostility stoked by Cold War animosities and domestic political imperatives, the stars finally aligned to make possible a historic breakthrough in US-Cuban relations,” said William LeoGrande, with whom I wrote Back Channel to Cuba: The Hidden History of Negotiations Between Washington and Havana.

Given the enormous political sensitivities regarding dialogue with Cuba, not to mention a normalization of relations, the Obama administration’s turn to back-channel diplomacy—furtive meetings, third-country interlocutors, secret emissaries—was crucial. Starting in June 2013, the Canadian government, which since 1960 has quietly pressed Washington to pursue better relations with Havana, hosted seven secret meetings between Cuban and US officials. On the US side were two White House representatives: Ben Rhodes, deputy national security adviser, and Ricardo Zuniga, senior director for Western Hemisphere affairs on the national-security staff. Secretary of State John Kerry talked directly with Cuban Foreign Minister Bruno Rodríguez four different times. Last March, Kerry and Obama met with Pope Francis at the Vatican, where the pontiff exercised his unique moral authority to push for a prisoner exchange between Cuba and the United States.

The talks dragged on for months over the administration’s refusal to trade the three Cuban spies, who had been in US prisons for sixteen years, for Gross, who had been arrested while setting up independent satellite communications networks in Cuba for USAID. The US officials balked because, they argued, there was no “equivalency” between Gross and the spies, even though the Kennedy and Carter administrations had released nonequivalent prisoners in order to extricate CIA agents from Cuban jails. A solution came when Cuba agreed to release Sarraff Trujillo. In October, a final negotiating session on the prisoner exchange was held at the Vatican.

Leahy’s office also played a key role in pressing the Obama White House to negotiate Gross’s release—and to seize the opportunity to completely reconfigure US-Cuban relations. Leahy’s senior aide, Tim Rieser, worked quietly with White House officials, traveled to Cuba several times to meet with Gross, and communicated weekly—sometimes daily—with him on the phone. In return for a relaxation of Gross’s prison conditions, Rieser convinced the administration to allow imprisoned Cuban spy Gerardo Hernández to engage in a successful long-distance artificial insemination effort with his wife, Adriana Pérez—one of the more unusual confidence-builders in the annals of international diplomacy.

From the outside, leading advocacy groups, such as the Washington Office on Latin America and the Center for Democracy in the Americas, helped sustain public attention; and the Trimpa Group, a strategic philanthropy agency, played an important behind-the-scenes role in creative lobbying. The unprecedented decision by the New York Times editorial board to assign its newest member, Ernesto Londoño, to write a weekly editorial calling for a change in policy provided political cover as well as public pressure on the White House to act.

Lobbied by Leahy, Representative Jim McGovern and former White House chief counsel Greg Craig, among others, to “just do it,” Obama agreed to the “grand bargain” approach, and the issue became a matter of timing. The White House decided to wait until after the midterm elections, and then till Congress ended its 2014 session and left town for the holidays. The first day of Hanukkah provided the perfect moment to bring Alan Gross home and announce a historic change in US policy.

In Cuba, the dramatic end of the Cold War in the Caribbean has certainly raised expectations of a better future for the island’s workers.

When news of the accord broke, I was in Havana at a conference on US-Cuban relations, so I witnessed firsthand the positive reaction. “It’s a day of jubilation!” the receptionist at the Hotel Nacional told me as Cuban TV reported that the final three members of the Cuban Five—“antiterrorism heroes,” as they are called in Cuba—had returned. Students poured into the streets for demonstrations of support; cars honked their horns.

Although the photogenic reunion of Gerardo Hernández, Antonio Guerrero and Ramón Labañino with their families dominated the airwaves, average Cubans—certainly the maids, bellboys, bartenders and taxi drivers at the hotel whom I could quickly interview—focused on the potential for economic improvement in their lives. “No se puede comer la politica,” said one chauffeur who had abandoned a career as a veterinarian to work in the tourism business—“You can’t eat politics.” He and other drivers were hoping for access to newer and bigger US automobiles. “I would like a Ford van,” he told me in fairly good English. “Finally!” a stock boy at the hotel liquor store declared.

The next day, Communist Party newspapers Granma and Juventud Rebelde ran the same banner headline: “¡Volvieron!”—a reference to Fidel Castro’s vow in 2001 that the five Cuban agents “shall return.” “Fidel was not mistaken,” stated one editorial in Granma, part of an official party effort to credit the now reclusive former leader with some role in these events.

In truth, it is Raúl Castro who has shepherded Cuba to the point where the United States has finally validated the revolution. He has adopted a far more pragmatic posture than his older brother regarding Cuba’s need to fundamentally transform its failed socialist economy. While Fidel tended to blame the US embargo for Cuba’s economic woes, Raúl has focused on Cuba’s own responsibility to increase production, cut corruption, expand private-sector enterprises and create a more inviting climate for foreign investors—all in the quest, President Castro said, for “prosperous and sustainable socialism.”

With reforms stalled and growth sluggish, peaceful co-existence with the United States will, he hopes, expand trade and travel, end economic and banking sanctions that are the result of Cuba’s being on the State Department’s terrorism list, and eventually allow Cuba access to international credit markets that are essential for economic development and transformation. With Cuba’s main ally, Venezuela, in the throes of its own dire economic crisis, the island’s future access to subsidized oil is increasingly in doubt; normal economic and political relations with the United States come at a propitious time.

For the Obama administration, there were three catalysts for ending the many years of aggression toward Cuba. The first and most immediate was the mental health of Alan Gross. When I visited Gross a year ago in the military hospital where he was incarcerated, his deteriorating state of mind threatened his well-being as well as Obama’s future capacity to make a major change in US policy. “I’m a ticking time bomb. Tick, tick, tick,” Gross told me during that visit, alluding to a suicidal plan he had to break down the door of the holding cell we were in and physically challenge the guards on the other side. As his sixty-fifth birthday approached last May, he announced it would be the last one he would spend in Cuba; when his wife and daughter visited him last summer, he told them he would not see them again, unless he was released soon. White House officials understood that the longer he remained in a Cuban prison, the greater the risk that he could hurt himself or others—a potential tragedy for the Gross family as well as broader US policy interests.

Obama also faced a regional imperative to find common ground with Cuba. On December 4, the government of Panama officially invited President Castro to the April 2015 Summit of the Americas—the first time Cuba has been included. Obama faced the proverbial fork in the road: he could boycott the summit and risk alienating every leader in Latin America; he could attend the summit and attack the Castro regime for being undemocratic; or he could use the meeting as a diplomatic opportunity to finally fulfill a commitment he had previously made to Latin American countries to advance and consolidate a more fruitful relationship with the Castro regime. “The United States seeks a new beginning with Cuba,” Obama had promised at the first Summit of the Americas he attended as president, in 2009. “I know there’s a longer journey that must be traveled to overcome decades of mistrust, but there are critical steps we can take toward a new day.”

Also at stake was Obama’s legacy. As a presidential candidate in 2008, he had vowed to “write a new chapter” in US-Cuban relations. Facing seemingly intractable challenges elsewhere in the world, fostering a legacy of change in what he calls “the fourth quarter” of his presidency is not only possible vis-à-vis Cuba, but preferable for US national and international interests.

Of course, key legislators, led by Senator Marco Rubio and Representative Ileana Ros-Lehtinen, have vowed to roll back Obama’s initiatives and sabotage normalized relations between Washington and Havana. The new agreement, as Raúl Castro reminded the Cuban public, “in no way means that the heart of the matter has been solved,” since the full embargo can be lifted only by majority vote in a Congress now dominated by Republicans—unlikely to happen anytime soon.

But in the coming months, the pace of diplomatic and economic interaction is sure to accelerate on both sides of the Florida Strait. Kerry is already reported to be planning a trip to Havana—one that would signal another historic step forward in relations between the two countries. By the time Obama sits down with Raúl Castro in Panama in April, the thaw in bilateral relations could be complete.

Ironically, Alan Gross, who spent five hard years in a Cuban prison and became a human symbol of the folly of Washington’s long efforts at regime change in Cuba, best summarized the significance of the policy changes that accompanied his release. “Five and a half decades of history show us that such belligerence inhibits better judgment,” he noted in a press conference the day of his return to Washington. Obama’s initiative to normalize relations is “a game-changer,” said Gross, “which I fully support.”