Pope Francis left Colombia on Sunday with calls for reconciliation after its half-century civil war and a peaceful end to the deadly crisis in neighboring Venezuela.
The Argentine pope, 80, held the last in a series of open-air masses in the Caribbean city of Cartagena -- one of Colombia's top tourist draws but also one of its poorest cities.
On the last day of his fifth visit as pope to his native continent, he reiterated calls for peace in Colombia and prayed for a peaceful end to Venezuela's "grave crisis."
"I assure all of you of my prayers for each of the countries of Latin America, and in a special way for neighboring Venezuela," Francis said.
"I appeal for the rejection of all violence in political life and for a solution to the current grave crisis, which affects everyone, particularly the poorest and most disadvantaged of society."
Venezuela's crisis has caused food and medicine shortages and clashes at anti-government protests that left 125 people dead from April to July.
The Vatican tried unsuccessfully to mediate in negotiations last year between Venezuela's government and opposition.
Thousands of Venezuelans have fled to Colombia to escape the crisis.
"We could ask the pope to intervene directly for dialogue," said Venezuelan housewife Nancy Pugliese, 35, who attended Francis's visit in Cartagena.
"We need all the spiritual support we can get to free Venezuela... The pope should tell President Maduro directly to listen to the people."
On Sunday, Venezuela's center right-led opposition was holding a vote to choose candidates for regional governorship elections scheduled for October.
The opposition MUD coalition and international powers have accused Maduro of stifling democracy by taking over power from state institutions.
Francis reiterated his call for reconciliation in Colombia as it works to seal an end to a half-century civil conflict.
He has supported a contested peace accord that has seen the disarmament of the country's biggest guerrilla force, the FARC. Critics say the guerrillas are getting off too lightly, with amnesties and alternative sentences.
"Deep historic wounds necessarily require moments where justice is done... But that is only the beginning of the Christian response," Francis said during his mass in Cartagena.
"We are required to generate 'from below' a change in culture: so that we respond to the culture of death and violence with the culture of life and encounter."
In Cartagena, Francis visited the impoverished district of San Francisco, where he blessed the foundations of a new homeless shelter.
"We have a lot of faith in Francis's visit to this forgotten district," said Willy Martinez, a 43-year-old bricklayer.
"Here, there are lots of people who only eat once a day. The worst thing is the corruption -- that is worse than the bullets of the guerrillas or the paramilitaries."
Francis prayed in the name of local holy figures, including Saint Peter Claver, patron saint of slaves, who worked in this colonial port city helping victims of the slave trade.
The pope defended the dignity of "those who are abandoned, immigrants and those who suffer violence and human trafficking."
Earlier, Francis got a cut on his brow and blood on his white cape when he bumped his head on the window of his Popemobile.
He was standing up in the specially designed vehicle, waving to admirers, when it braked sharply.
"I got bashed," he joked to reporters.
Francis took off from Cartagena on his flight back to Rome on Sunday evening.