WASHINGTON - The historic breakthrough in US-Cuban relations began in spring 2013, when President Barack Obama authorised secret talks with Havana, the same tactic he used to open nuclear negotiations with Iran.
Months of talks in Canada and at the Vatican, involving one of Obama's closest aides, culminated on Tuesday when Obama and Cuban President Raul Castro spoke by phone for nearly an hour and gave final assent to steps that could end a half-century of enmity and reshape Western Hemisphere relations.
Obama believed that "if there is any US foreign policy that has passed its expiration date, it is the US-Cuba policy," said a senior Obama administration official, briefing reporters on condition of anonymity.
The Vatican played a key role in the rapprochement, including facilitating talks on the release of Alan Gross, a former subcontractor for the US Agency for International Development who returned from Cuba on Wednesday after five years' imprisonment, US officials said.
In early summer 2014, Pope Francis - who is from Argentina - sent separate personal letters to Obama and Castro, urging them to exchange captives and improve relations.
When the pope received the US president in Vatican City in late March, the secret Cuba talks were a central topic of discussion. Cuba "got as much attention as anything else," the official said.
The first face-to-face talks that eventually led to this week's deal took place in June 2013 in Canada, which has long maintained relations with Cuba.
Leading the US delegation were Ben Rhodes, a close Obama aide who is a deputy national security adviser, and Ricardo Zuniga, the top Latin American specialist on the White House's National Security Council. The names of the Cuban participants in the talks could not immediately be learned.
US and Cuban prisoners were a major point of debate, the officials said.
For the Obama administration, Gross' continued imprisonment was both a practical and political barrier to improved ties.
Secretary of State John Kerry spoke by phone four times this summer with Cuban Foreign Minister Bruno Rodriguez about Gross, a second senior US official said.
Kerry told the Cubans that if anything happened to Gross, there would never be better relations between Washington and Havana, this official said.
The Vatican got involved as early as March 2012, when a group of US lawmakers went to the papal ambassador's office in Washington's posh Embassy Row section and pleaded for help.
Since then, through a Vatican transition from Pope Benedict XVI to Pope Francis, "it has always stayed on the Vatican's radar," said Senator Barbara Mikulski, from Gross' home state of Maryland. "They talk to higher powers. I don't know if it's radar or angels, Cherubim, Seraphim - they go for it."
In the talks, Washington also insisted on the release of a spy for the United States who had been languishing in a Cuban prison for nearly two decades.
The unidentified individual "was instrumental in the identification and disruption of several Cuban intelligence operatives in the United States," the office of Director of National Intelligence James Clapper said in a statement.
Among the Cuban operatives unmasked by the agent were a senior US Defence Intelligence Agency analyst and members of a Florida-based spy ring known as the "Wasp Network."
Cuba insisted on the release of three members of the network, Cuban intelligence agents who had served 16 years in US jails.
In the talks, there were also clear signs of unresolved disputes. The Cubans reiterated calls for an end to US pro-democracy programs in Cuba, which Havana has long viewed as a thinly disguised attempt to overthrow its communist system. Washington did not accede to those demands, the first senior official said.
The transfer of prisoners was finalized at a key meeting at the Vatican, the official said. The date of that session is unclear.
5 A.M. FLIGHT TO HAVANA
At 3 a.m. EST (0800 GMT) on Wednesday, Gross' congressman, Maryland Democrat Chris Van Hollen, awoke to catch a 5 a.m. flight to Havana. His group, which included Gross' wife Judy, Republican Senator Jeff Flake and Democratic Senator Patrick Leahy, arrived at 8 a.m. at an airport outside the Cuban capital.
"We went into a room. We were escorted there by a couple of Cuban officials, and in the room was Alan Gross, along with two American officials who were part of the Interests Section," Van Hollen said.
Gross, he said, "looked very frail, but his spirits were very high."
Gross's lawyer had told him in a phone call on Tuesday that he was to be released. After a pause, Gross replied, "I'll believe it when I see it," according to a spokeswoman, Jill Zuckman.
On the plane home, Zuckman said, Gross found some favourite foods: popcorn, a corned beef sandwich with mustard on rye bread, and potato pancakes known as latkes. For Gross, who is Jewish, it was a special day -- the first day of Hannukah.
At 8:45 a.m., the pilot announced the plane had left Cuban airspace. Said Zuckman: "Alan stood up on the plane and took a deep breath at that moment."