Pope Francis met with President Emmanuel Macron of France on Saturday on the second day of a whirlwind trip to Marseille, a port city in the country’s south where the pontiff reiterated his forceful condemnation of the world’s indifference toward the deaths of migrants trying to cross the Mediterranean to Europe.

Thousands of police officers blanketed the city on Saturday and blocked traffic around the Palais du Pharo, a 19th-century palace overlooking the city’s old port where Mr. Macron and his wife, Brigitte, greeted Francis on a windy morning.

They shook hands and smiled, and the 86-year-old pontiff, who often uses a wheelchair, briefly walked instead, holding onto Mr. Macron’s arm.

The pope’s trip is not an official state visit. Mr. Macron and Francis attended the closing session of the Mediterranean Meetings, a weeklong gathering of bishops and other representatives. They then met one on one for half an hour, ahead of a giant Mass later in the afternoon at Marseille’s soccer stadium.

The Rev. Vito Impellizzeri, a professor at the Pontifical Theological Faculty of Sicily, who attended the gathering, said the pope was coming to help shift perceptions of the Mediterranean.

“It should not simply be the tomb and clash of civilizations,” he said, but also “a space of reciprocity and encounters.”

The pope has focused much of his trip so far on the plight of migrants attempting the dangerous Mediterranean crossing from North and sub-Saharan Africa to Europe.

In a speech on Saturday, he said the Mediterranean was transforming from “the cradle of civilization” into a “graveyard of dignity.” People “have the right both to emigrate and not to emigrate,” he said, but all should be afforded compassion.

“Those who risk their lives at sea do not invade, they look for welcome,” the pope said, calling migration “a reality of our times” that European governments needed to handle with greater cooperation, more legal routes to entry, and better integration.

“Here also the Mediterranean mirrors the world, with the South turning to the North,” he said, adding that many developing countries plagued by instability, conflict and desertification were “looking to those that are well-off, in a globalized world in which we are all connected, but one in which the disparities have never been so wide.”

Mr. Macron is a disrupter of French politics who has long been fascinated by Francis’ willingness to shake things up in the church, but he does not see eye to eye with the pope on a number of issues.

His government has hardened its stance on the issue of migrants as it seeks support from the right on an upcoming immigration bill, and it is expected to unveil legislation on assisted dying this fall — a policy that the Roman Catholic Church rejects. In his speech, Francis criticized “the false pretenses of a supposedly dignified and ‘sweet’ death.’”

Tens of thousands are expected to line the streets later in the day as Francis is driven to the Vélodrome, the soccer stadium in Marseille, where devotion to the local team is a faith of its own.

Cardinal Jean-Marc Aveline, the archbishop of Marseille, who helped orchestrate the pope’s trip, said in an interview with the daily Le Parisien this week that Francis had told him, “If I go to Paris, I will see protocol; in Marseille, I will see the people.”

“That’s why we chose the Vélodrome,” Cardinal Aveline said. “At the stadium, it’s like going into the home of each Marseillais.”

He added, “Marseille attracts him because it’s a periphery, between Europe and the Mediterranean, Orient and Occident, and in particular because it is a place of fracture.”

Francis has long preferred traveling to the world’s fringes rather than its power centers. In Marseille, he met privately early Saturday with people “in a situation of economic hardship” at a charity house, according to the Vatican.

Marseille, a gritty, sprawling city of about 870,000, is plagued by pockets of extreme poverty, strained social services and deadly drug-related violence. But it is also one of France’s oldest and most cosmopolitan cities, a predominantly working-class patchwork of ethnic and religious communities that has been shaped by waves of immigration from Europe and Africa.

“It’s a city that suits the pope,” said Isabelle de Gaulmyn, a top editor at La Croix, France’s leading Catholic newspaper.

Elisabetta Povoledo contributed reporting from Rome.