HAVANA (Reuters) -urged Cubans on Wednesday to search for "authentic freedom" and wound up his trip with a chat with the communist country's revolutionary icon Fidel Castro.
The two octogenarians spoke for about a half an hour in the Vatican embassy after the pope celebrated an open-air mass for a crowd estimated by the Vatican at some 300,000 people in Havana's Revolution Square.
Benedict, who said last week that communism no longer works in Cuba, pressed the government to let the Catholic Church teach religion in schools and universities.
Vatican spokesman Father Federico Lombardi said Castro told the pope he had watched the entire trip on television. They had an exchange of ideas about Church liturgy, the world situation, and science.
"Castro asked the pope 'What does a pope do?' and the pope told him of his ministry, his trips, and his service to the Church," Lombardi said.
Castro then asked Benedict to choose a book for him to read and reflect on, and the pope said he would.
Earlier the pope, who was leaving for Rome on Wednesday night, led a Mass in the sprawling plaza that Castro, now 85, used to fill with big crowds and fiery revolutionary rhetoric in hours-long speeches.
Surrounded by ten-story high images of Castro's revolutionary comrades Ernesto "Che" Guevara and Camilo Cienfuegos, the pope read a sermon that continued one of the main themes of his trip - that Cuba should build a more open society, based on truth, justice and reconciliation.
"The truth is a desire of the human person, the search for which always supposes the exercise of authentic freedom," he said.
In an apparent dig at Marxism, he also said some "wrongly interpret this search for the truth, leading them to irrationality and fanaticism; they close themselves in 'their truth,' and try to impose it on others."
Benedict also made an apparent reference to Cuba's tense relations with the United States, which imposed an economic embargo on the island 50 years ago.
"Cuba and the world need change, but this will occur only if each one is in a position to seek the truth and chooses the way of love, sowing reconciliation and fraternity," he said.
The vast area was filled with people waving Cuban flags and wearing broad hats and holding umbrellas to shield them from the sun.
As Benedict arrived in a popemobile, they wildly welcomed the successor of the much-beloved Pope John Paul, who made a historic, groundbreaking trip to Cuba in 1998 and preached from the same square.
Benedict, wearing purple vestments, read out a virtual shopping list of rights the Church still lacks in Cuba as President Raul Castro, Fidel's younger brother, sat in the front row. Both of the Castro brothers were educated by Jesuits, the worldwide Catholic order.
While he acknowledged "with joy" the great improvements since John Paul's visit, he added: "Nonetheless, this must continue forwards, and I wish to encourage the country's government authorities to strengthen what has already been achieved and advance along this path."
The faithful could be "at once a citizen and a believer", the pope assured the government, adding that strengthening religious freedom consolidates social bonds.
"This is why the Church seeks to give witness by her preaching and teaching, both in catechesis and in schools and universities," he said.
At the end of the Mass, Raul Castro, wearing a traditional white guayabera shirt, was invited to the altar platform and the two men greeted each other as the crowd applauded.
Since his arrival in the eastern city of Santiago, the pontiff has spoken of Cuba's need for reconciliation and a more open society, with the Church at its side as a buffer against "trauma" or social upheaval.
"We hope he brings peace, an end to wars, and an end to the U.S. embargo," said Belkis Martin Rodriguez, 49, walking to Revolution Square dressed in jean shorts, with her mother and 8-year-old son.
Asked if she hoped for reconciliation between the communist government, dissidents and exiles in Miami, she said: "Let each remain in their own place. If people left for Miami, let them stay there and be happy. Let the Church stick to its own field, religion, and let the government handle the politics."
In talks on Tuesday with Raul Castro, the pope urged a bigger role for the Church and asked that the government consider making Good Friday, the day Christians commemorate Christ's death, a national holiday.
Fidel Castro reinstated Christmas as a holiday ahead of the landmark visit of John Paul that helped improve long-strained Church-state relations.
The Vatican said it also made several "humanitarian requests," without giving details but possibly having to do with political prisoners or jailed American contractor Alan Gross, who is serving a 15-year sentence for illegally installing Internet networks on the island.
At a time when Church-state relations are the warmest they've been since the 1959 revolution, Benedict has not been afraid to poke the Cuban government in some sensitive places.
On the flight to Mexico beginning his trip on Friday, the pope said communism "does not correspond with reality" and that Cuba needs a new economic model.
Upon his arrival, he made thinly-veiled references to Cuban dissidents, political prisoners, Cuban exiles and asked the island's patron saint, the Virgin of Charity of El Cobre, "to guide the future of this beloved nation in the ways of justice, peace, freedom and reconciliation."
His Monday evening mass in the eastern city of Santiago de Cuba began with a man in the crowd shouting "down with communism" and being hustled off by security agents.
President Castro has launched economic changes aimed at strengthening communism for the future, but Marino Murillo, a vice president in the Council of Ministers and the country's economic reforms czar, made it clear that change to Cuba's one-party political system is not in the works.
"In Cuba there won't be political reform," he said at a news conference. "We are talking about the update of the Cuban economic model to make our socialism sustainable."
Murillo said the government welcomed all ideas, but would not allow them to be imposed on the country.
In response, Vatican spokesman Father Federico Lombardi said the Church "is not trying to impose solutions. We know it is a long road and that the history of Cuba is complex."
(Additional reporting by Simon Gardner, Rosa Tania Valdes and Nelson Acosta. Editing by David Adams and Kieran Murray)