Updated 1:40 p.m.

Pope Francis played a pivotal role in re-establishing diplomatic relations between the United States and Cuba more than five decades after the countries broke off relations. Vatican, U.S. and Cuban officials in Canada negotiated the terms in secretive talks, the Associated Press reported Wednesday.

U.S. officials said Francis sent letters to President Barack Obama and Cuban President Raul Castro this summer urging the leaders to re-establish relations, the AP said. This included an appeal to release American Alan Gross and the three Cubans held in the United States, the official, who spoke on the condition of anonymity, said.

"Pope Francis issued a personal appeal to me and to Castro urging us to resolve Alan's case and to address Cuba's interest in three Cuban agents who have been jailed in the United States for more than 15 years," Obama said in an announcement Wednesday.

According to the U.S. official, the letter “gave us greater impetus and momentum for us to move forward.” Officials also said Obama and Francis spoke about Cuba during a private discussion at the Vatican in March.

Obama and Cuban President Raul Castro spoke on the phone for 45 minutes Tuesday. 

Besides the release of Gross and the three Cubans imprisoned in the U.S., the agreement also includes the release of an unnamed “intelligence asset” imprisoned in Cuba for 20 years. Obama has told Secretary of State John Kerry to discuss the reopening of an U.S. embassy in Havana.

“The support of Pope Francis and the support of the Vatican was important to us,” the U.S. official said.

In a statement made public after the Obama’s and Castro’s presidential addresses Wednesday, the Vatican described its role in the historic agreement.

“The Holy See received delegations of the two countries in the Vatican last October and provided its good offices to facilitate a constructive dialogue on delicate matters, resulting in solutions acceptable to both parties,” the Vatican said in a congratulatory statement.

Catholicism is the most prevalent faith in Cuba. The country was officially atheist between 1962 and 1992. Since then, a network of home churches has been established, and official Christmas observance has returned. Homilies and mass are allowed to be broadcast on government media.

Pope Francis may be following in Pope John Paul II’s footsteps. The late pontiff has been credited for his work in the fall of communism two decades ago. Quiet negotiations took place between the Vatican, communist regimes and U.S. officials, but Pope John Paul II voiced his opinions in public addresses as well. He supported the Solidarity labor union movement in Poland. In 1989, he arranged a historic meeting with Russian president Mikhail Gorbachev that helped bring the Catholic Church back into Soviet bloc countries.

"He said, 'I don't serve any political parties, I serve God,'" Gorbachev told CNN in 2005 about the conversation. "'So I'm after the same things that you are trying to achieve with your perestroika.'"