Former Archbishop Cardinal Jaime Ortega, at a Mass in Havana Cathedral on May 7, 2016.
CNN  — 

Former Havana Archbishop Cardinal Jaime Ortega y Alamino, a key figure in the secret negotiations that led to the restoration of diplomatic relations between the United States and Cuba, has died, the state-controlled newspaper Granma reported Friday. He was 82.

As archbishop for more than two decades, Ortega oversaw the visits of three popes to the island and the slow rebuilding of the church’s influence under the rule of the late Fidel Castro.

Ortega died early Friday, according to Granma, which published a death notice from Havana Archbishop Juan de la Caridad García Rodríguez.

After Castro’s 1959 revolution, Ortega, as a young priest, was jailed in a government work camp for suspected opponents. He spent eight months performing forced labor before being released.

Decades later, as archbishop, he hand-delivered clandestine messages from Pope Francis to Barack Obama and Raul Castro that urged the leaders to put aside Cold War-era mistrust and forge a new relationship between the United States and Cuba.

On December 17, 2014, the day Obama and Castro announced the historic deal that led to prisoner exchanges and negotiations to restore full diplomatic relations, Francis publicly thanked Ortega for his role in the breakthrough.

Ortega greeted Obama at Havana’s Cathedral on the first day of the President’s visit to Cuba in March 2016. Obama was the first U.S. president to visit Cuba in nearly 90 years.

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.

Following the collapse of the Soviet Union, Cuba gradually lifted many prohibitions on religious worship. The church, while still closely watched 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 direct access to Castro, Ortega negotiated an amnesty for 75 political prisoners in 2010.

That same year Ortega had appealed the government to lift the ban on demonstration by the Ladies in White, a group made up of the relatives of political prisoners, according to the book “Back Channel to Cuba” by Peter Kornbluh and William LeoGrande. Castro agreed.

The Cuban government’s willingness to treat the Catholic Church as a legitimate party in a dialogue on human rights was unprecedented,” the authors wrote.

“As Ortega said, the government has ‘recognized the role of the church as an interlocutor’ with civil society in a way that it never had before.”

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.

In 2015, Cuba agreed to free 3,522 prisoners ahead of Pope Francis’ visit to the island, the government announced.

Ortega called it a “humanitarian gesture” that came after the Catholic Church in Cuba gathered requests from prisoners’ families and submitted them to government officials.

Over the years, Ortega defended himself against criticism for not openly challenging the government over human rights abuses, saying that he found engaging Cuban officials behind-the-scenes to be more effective.

“The desire that Raul Castro expressed to the United States: to live together with differences but in a civil way is also what the Cuban Church has expressed to the Cuban government,” Ortega told CNN. “The church is not an enemy.”

Ortega, who was born on October 18, 1936, in the central province of Matanzas, was ordained there in August 1964.

“His tireless pastoral work and his love for Cuba led him to decisively strengthen relations between the Roman Catholic Church and the State,” Granma said Friday.

He was an accomplished pianist who once considered a career as a musician before ultimately joining the priesthood.

CNN’s Patrick Oppmann contributed to this report.