Pope Francis ended his four-day trip to Cuba on Tuesday by calling on Cubans to rediscover their Catholic heritage and live a "revolution of tenderness," powerful words in a country whose 1959 revolution installed an atheist, communist government that sought to replace the church as the guiding force in people's lives.

Francis spoke at Mass at Cuba's holiest shrine, with President Raul Castro attending, before he flew to Washington to begin a five-day tour of the United States.

The pontiff's homily in the Sanctuary of the Virgin of Charity of El Cobre was the latest in a series of carefully worded critiques of the Cuban system during his four-day trip.

At his Sunday Mass in Havana, he urged thousands of Cubans to serve one another and not an ideology. He also encouraged them to refrain from "looking to one side or the other to see what our neighbor is doing or not doing," words that resonated in a nation where the government controls most aspects of life.

Some 10 percent of Cubans regularly celebrate Mass, and the church has been trying to seize on the softening of the Cuban system under Raul Castro to rekindle the country's religious heritage.

"Generation after generation, day after day, we are asked to renew our faith," the pope said Tuesday. "We are asked to live the revolution of tenderness as Mary, our Mother of Charity, did."

Francisco Elliott Jimenez, a 65-year-old mechanic, stood in a crowd about a block from the Cathedral of Santiago and said he was moved by Francis' message.

"Revolution isn't a political event. Revolution is evolution," Jimenez said. "That's what the pope is asking for, that our way of thinking evolves. He's opening a lot of people's minds."

The pope spoke in the foothills of the Sierra Maestra mountains where Castro and his brother Fidel commanded a guerrilla army that eventually swept through the country and seized power in 1959.

After decades of official hostility to the church, the government has been gradually giving it greater space to operate in recent years, letting churches reopen and allowing priests to run education programs and extensive outreach to the poor, sick and elderly.

Francis has been carefully balancing his desire to work with Castro's government on its path of internal reform and detente with the United States with his longstanding critique of communism as a system that stifles the spirit.

"He left us with a spiritual and ethical message and emphasized strongly that Cuban must not stay enclosed among themselves, must open themselves to others and construct a country where the people think in diverse ways, but unified," said Roberto Veiga, editor of Cuba Posible, a think-tank focused on Cuba's ongoing economic and social reforms.

___

Garcia reported from Havana.

___

Associated Press writers E. Eduardo Castillo, and Michael Weissenstein in Havana and Nicole Winfield and Andrea Rodriguez in Santiago contributed to this report.

___

Michael Weissenstein on Twitter: https://twitter.com/mweissenstein