The president of Cuba is a communist who was educated in Jesuit academies. The pope is a Jesuit who grew up attending public schools.

They took vastly divergent paths, but both Raúl Castro, 84, and Pope Francis, 78, are immigrants’ sons who were brought up in post-World War II Latin America and who today share a sense of alarm about where the rapidly globalizing world is headed.

Francis’s denunciations of liberal capitalism and his central role in Cuba’s reconciliation with the United States have pleased Castro so much that he declared in May that he was considering a return to the church. When reporters laughed, the Cuban leader insisted: “I’m serious.”

Now it will be up to Francis to leverage that goodwill and to obtain a few of the church’s wish-list items in Cuba.

An image of Pope Francis on the side of the Sagrado Corazon church in Havana sends a welcome message to the pontiff. The pope will visit Cuba from Sept. 19-22. (Desmond Boylan/AP)

Castro has said he plans to accompany the pope throughout his visit to the island Saturday to Tuesday. Although it is not listed on his official schedule, Francis is also likely to meet privately with former president Fidel Castro, 89, according to the Vatican.

Francis’s trip follows Pope Benedict’s in 2012 and the trailblazing visit of Pope John Paul II in 1998. Long before those trips, the church dropped its confrontational approach to the Castro brothers in favor of a quieter push for gradual change and a greater role in civic life. Both papal visits advanced those goals.

In cities and towns across the island, the Catholic Church and other religious congregations are assuming a growing social role where the impoverished socialist state is falling down. The church offers English-language and computer courses; hot meals and medicine; and care for the elderly, disabled, neglected and paroled.

But in other fundamental ways, Cuba remains the most restrictive country in the Americas for religious expression. The Catholic Church cannot operate its own K-12 schools, and it is largely absent from the state-controlled airwaves. Many properties seized during the peak of tensions between Castro and the Catholic Church in the 1960s remain under government control.

The pope arrives at a critical phase in the Communist Party’s attempt to transition Cuba to a post-Castro era. Ailing Fidel Castro has all but withdrawn from public life, and Raúl Castro insists that he will step down in 2018, when his five-year presidential term is set to end. Next in line to succeed him is Vice President Miguel Díaz-Canel, 55.

Kennedy-era U.S. trade sanctions remain in place. The church opposes them, and Francis is expected to criticize the measures during his visit.

“This is a very complex moment in Cuba,” religion scholar Enrique Lopez Oliva said in Havana. And Francis “is trying to insert the Catholic Church into the country’s process of change.”

Like many Cubans of his generation, Raúl Castro openly worries about what he calls a “loss of values” among Cuban youths. Despite a virtual government monopoly on media, Cuban leaders see evidence for their concern in the popularity of sex-charged reggaeton music, violent video games and what they call banal television programming.

They lament the erosion of socialist mores, but they rarely acknowledge the toll inflicted by 25 years of economic austerity and a system of woefully low-paying state jobs that don’t afford a dignified life. Moral compromises — pilfering, prostitution and corruption — became acceptable survival tactics for many Cubans.

Yet there are few signs that the government is ready to cede ground on fundamental issues such as K-12 schooling. The country’s still relatively strong public education system plays a central role in spreading the socialist ideology at the core of the Castros’ revolution, and it is critical to their vision of Cuban national identity.

“The country had a separate Catholic education system in the past that produced social stratification and elites,” said Catholic intellectual Lenier González.

He said it is likely that the Cuban government will continue allowing the church to have an educational role that complements, but does not compete with, K-12 schooling.

In that model, the church can expand its role in preschool education, university-level training and after-school classes that “teach the values of the church, faith and morality,” he said. But a parallel, private religious education system may still be out of bounds.

Both Fidel and Raúl Castro grew up in such a system. Their father, a Spanish immigrant who became a prosperous sugar-cane planter, sent them to Jesuit boarding schools in Santiago de Cuba and later Havana.

Fidel Castro arrived in 1942 at the Colegio de Belén, when he was 16. Today, it’s a military academy.

Set on sprawling grounds adjacent to the sultry Tropicana nightclub, much of the once-prestigious campus appears to be in disrepair. There’s been speculation here that Raúl would bring Francis — who spent much of his life studying and working at Argentina’s top Jesuit school — to see the former Belén campus. But that seems unlikely.

On a recent morning, soldiers were drilling on the baseball fields where Fidel Castro was a notable pitcher and track star. Billboard-size messages to the cadets were visible behind the high walls and fences.

“Success depends on intelligence, patience, and above all firmness of action,” read one. “Be alert!” urged another.

Perhaps a more attainable short-term goal for Francis, observers say, would be getting permission to open an independent Catholic university on the island.

Francis will pay a visit, during his trip, to Havana’s Padre Varela cultural center, a former seminary that already functions as a small de facto university. About 90 students are enrolled in a humanities program there, and they can obtain corresponding degrees through affiliated universities in Europe.

The center in recent years offered an MBA training program geared toward Cuba’s emerging entrepreneurs, and demand was high. But the program was controversial with Cuban authorities, and it has ceased to operate.

Read more:

Is Cuba on the verge of major political reform?

For Pope Francis, an unfinished mission in Cuba

Conservative dissent is brewing inside the Vatican