Havana, Cuba (CNN) When Pope Francis lands in Cuba on Saturday he will find a changing country. He may well take some pride in those transformations since they came about in part through the Pope's own involvement in secret diplomacy worthy of a spy thriller.

President Obama announced last December that the United States and Cuba would restore diplomatic relations. Since then, the island has been buzzing with the possibilities of a new era.

Just this week, the United Nations announced that Cuban President Raul Castro would travel to New York to attend the U.N. General Assembly. It will be his first visit to the U.S. in more than a half century. And U.S. and Cuban officials have said that President Obama could visit the Communist-run island next year, if the two countries progress sufficiently in normalization talks.

The change that Francis helped bring about has been so dramatic that even longtime atheist and Marxist Raul Castro has said the Pope has made him consider praying again.

How the Pope lobbied for change

On the day the about-face in relations was announced, both Obama and Raul Castro thanked Pope Francis for urging them to reach the landmark agreement to swap prisoners and end decades of Cold War animosity.

That morning, Havana's Archbishop Cardinal Jaime Ortega y Alamino was interrupted from his breakfast by the news of the coming announcement.

The breakthrough was no surprise to Ortega, who served as the church's point man to ensure the negotiations would not die the quiet death of so many past attempts.

In an exclusive interview, Ortega revealed to CNN that when the Pope and Obama met at the Vatican for the first time in March 2014, the Pope lobbied the U.S. President to lift sanctions on Cuba.

JUST WATCHED Times Pope Francis has surprised us Replay More Videos ... MUST WATCH Times Pope Francis has surprised us 02:28

"The Pope brought Cuba up," Ortega said. "Cuba's role in Latin America, and how it was important not just for Cuba but all of Latin America, that the detrimental economic measures be lifted."

Obama, the Cardinal said, surprised the Pope by agreeing with his harsh critique of U.S. policy.

Programming Note Don't miss live coverage of Pope Francis' trips to Cuba and the U.S. on CNN and CNNgo, and see the people and places that shaped Pope Francis in a CNN special report, "The People's Pope," Tuesday at 9 p.m. ET.

"The President's response was very clear," Ortega said. "That these measures were very old, made before his birth and that he wished to change them. This encouraged the Pope."

Obama more than shared the Pope's desire to change course on Cuba -- he had already taken action to dismantle the United States' five-decades-old policy of isolation.

In June 2013, U.S. administration officials, acting on Obama's orders, began secret talks with the Cuban government to resolve long-standing obstacles to improved relations.

But the negotiations were stuck on the issue of how to free the prisoners each country had. Cuba had long demanded that five imprisoned Cuban intelligence officers who had formed part of the "Wasp Network," a spy ring in South Florida, be freed and sent home.

In return, Cuba had offered "a humanitarian solution," swapping the agents for Alan Gross, the State Department sub-contractor who was serving a 15-year prison sentence in Havana for attempting to set up an Internet network for Cuban dissidents "to promote destabilizing activities and subvert constitutional order."

But U.S. officials had repeatedly rejected the offer, saying Gross wasn't a spy and wouldn't be swapped for the Cuban agents.

Cuba as well turned down U.S. entreaties to swap the Cuban agents for American fugitives like Assata Shakur, who received political asylum on the island after being convicted of killing a New Jersey state trooper and escaping from U.S. prison.

An assist from the Cardinal

Bridging the divide would require diplomacy and secrecy of the cardinal.

Cardinal Ortega, 78, is an accomplished pianist who once considered a career as a musician before ultimately joining the priesthood. Ortega wears thick glasses, and chronic health problems have left him with a shuffling gait. On face value, he would seem an unlikely participant in diplomatic intrigues worthy of a John le Carré novel. But after 21 years as Cardinal, Ortega has influence and contacts that few others on the island can match.

After the revolution took power, Ortega was among the priests sent to work camps for people Castro's government considered to be undesirables. He spent eight months performing forced labor before being released.

Following the collapse of the Soviet Union, Cuba gradually lifted many prohibitions on religious worship. The church, while still kept on a short leash by the Cuban government, once again became a powerful institution on the island.

Cardinal Ortega developed a respectful working relationship with Raul Castro, who took over from his ailing brother, then-President Fidel Castro, in 2006. Two years later, Fidel Castro resigned, and Raul Castro became president.

Using his rare, direct access to Castro, Ortega negotiated an amnesty for 75 political prisoners in 2010. But for many Cuban exiles, that access cast a cloud of suspicion over Ortega, whom they accused of not pushing the government to enact more political and economic reforms.

Although Ortega didn't engage directly in the talks to restore U.S.-Cuban relations, he played key roles during parts of the delicate negotiations, officials from both countries said.

The Vatican, as well as Canada, hosted the secret talks, and in August the Pope sent letters to both Presidents Obama and Castro urging them to reconcile their governments' longstanding differences.

Ortega was chosen to be the emissary of the Pope's missives.

"In secret diplomacy, secure communications often take a circuitous route. Pope Francis could not really just send an email to President Obama," according to Peter Kornbluh, co-author (with William LeoGrande) of a new edition of " Back Channel to Cuba " that details the role of the Vatican.

"Ortega's ability to get a papal letter into the hands of the President of the United States also necessitated clandestine diplomacy," said Kornbluh. "A trip to Washington on the pretext of a speech at Georgetown, and a secret Rose Garden rendezvous with President Obama to give him the Pope's message."

The exact contents of the Papal letters have still not been released.

But soon another letter would reach Ortega that would also have an impact on the talks.

It came from a man Ortega had met while ministering to inmates in a Cuban prison.

"He offered himself as someone who could be traded," Ortega said of the letter from Rolando Sarraff Trujillo, a Cuban intelligence officer who was imprisoned in the 1990s after Cuban officials discovered he was also working for the CIA.

JUST WATCHED The Pope's role in the Cuba breakthrough Replay More Videos ... MUST WATCH The Pope's role in the Cuba breakthrough 02:24

"When he wrote me, he had some intuition that he could be in the conversations going on, as one of the people to be traded for the Cuban prisoners in the U.S.," Ortega said. "He sent me a letter offering to be traded, which I delivered to the authorities here."

On December 17, 2014, Sarraff and Gross were released and sent to the U.S. on separate planes after the three remaining Cuban agents flew back on a U.S. government plane that landed in the Cuban capital as dawn broke.

In his announcement that afternoon, Obama called Sarraff "one of the most important intelligence agents that the United States has ever had in Cuba."

Greeting the returned Cuban intelligence agents was another man who had taken part in the negotiations to free the men: Alejandro Castro Espín, Raul Castro's son.

Neither Cuba nor the U.S. has acknowledged the younger Castro's participation in the negotiations with the U.S.

But Alejandro Castro, a colonel in the Cuban Interior Ministry, later accompanied the released intelligence agents when they met Fidel Castro and was next to his father when Raul Castro met Barack Obama at the Summit of the Americas in Panama.

Authors Kornbluh and LeoGrande say there is a logic behind keeping the identities of Cuba's negotiators a secret.

"They remain anonymous in part so they can continue effective back channel diplomacy in the future ... when and if it is needed for Washington and Havana to resolve remaining obstacles to fully normal relations," Kornbluh said.

A new path forward

Pope Francis during his visits to Cuba and the U.S. will no doubt also continue to push forward the process of reconciliation between the longtime Cold War adversaries.

"He's coming because it's part of the process that began with the restoration of relations, he's coming to heal wounds," said Austen Ivereigh, author of the Francis biography "The Great Reformer."

"I think that for this papacy the sea between Havana and Miami is what the Berlin Wall was to the Papacy of John Paul II."

Francis will visit Havana, Holguin and Santiago before becoming the first Pope to travel across the waters that separate Cuba and the U.S.