Listen to this story:

ROME – Hungarian Prime Minister Viktor Orbán came calling on Pope Francis Thursday, and, according to the official chronology, the encounter lasted a robust 40 minutes. From one point of view, the headline could well be that the two leaders could spend that much time together without coming to blows.

They disagree on almost everything, from the migrant and refugee crisis in Europe to the war in Ukraine. When Orbán won a crushing reelection victory on April 4, he boasted that he had defeated his “opponent” in President Volodymyr Zelenskyy of Ukraine, and he took a congratulatory phone call from President Vladimir Putin of Russia.

April 4 was the same day, as fate would have it, that Pope Francis was in Malta, urging a welcoming attitude toward migrants and refugees and even confirming his willingness to travel to Kyiv in what would amount to a show of support for Zelenskyy and the Ukrainian cause.

Even the vocabulary of this relationship suggests its challenges.

Pro-Orban media in Hungary have used terms including “cretinous” and “senile” to characterize the pope’s views on immigration, while a member of Orbán’s ruling Fidesz party has dubbed Francis the “Soros Pope” for his views on the economy – and, let’s be clear, that wasn’t meant as a compliment.

Meanwhile, Francis repeatedly has blasted right-wing populism of Orbán’s vintage, including during a recent trip to Greece.

“We cannot avoid noting with concern how today, and not only in Europe, we are witnessing a retreat from democracy,” Francis said. “The remedy is not to be found in an obsessive quest for popularity, in a thirst for visibility, in a flurry of unrealistic promises…but in good politics.”

When Francis spent just seven hours in Hungary last year for the conclusion of a Eucharistic Congress, he granted Orbán just a few moments to say hello before a Mass in which he said that only human fraternity can defeat hatred, and also warned of a kind of religiosity that lives “on rites and repetitions” rather than the essence of the gospel, in what many local observers took to be a swipe at members of the Fidesz party who trumpet their Catholic credentials while ignoring the pope’s injunctions on social policy.

It also can’t have gone down well with Francis and his advisers that Orbán’s only other meeting in Rome on Thursday was with Matteo Salvini, leader of the far-right, anti-immigrant Lega party and not exactly a close friend of this papacy.

In general, Francis represents the sort of progressive, dialogic Catholicism most at home with the political center-left and deeply committed to both European and global integration; Orbán and his Fidesz party, on the other hand, embody a deeply conservative, nationalistic, and identity-based Catholicism that sees much of the Francis agenda as dubious.

Yet there Orbán and Francis were on Thursday, smiling for the cameras and seeming for all the world as if they’d just had a nice, friendly exchange. What gives?

For one thing, Francis is well aware that even sworn enemies can find common ground once in a while, much as the Vatican and Orbán’s Hungary have done over Ukrainian refugees.

According to the Hungarian government, since the beginning of the war more than 600,000 refugees from Ukraine have entered Hungarian territory. Of that number, roughly 17,000 have request humanitarian protection while more than 100,000 have asked for temporary residency permits, both of which signal an intention to remain in Hungary at least for the time being.

After the encounter, a Vatican spokesman let it be known that the pontiff had congratulated Orbán for Hungary’s receptivity to Ukrainian refugees, conveniently omitting the fact that they’re still blocking new arrivals from anywhere else, not to mention that Orbán has also refused to grant permission for shipments of arms to cross Hungarian territory on their way to Ukraine.

More broadly, Francis and Orbán actually have something in common vis-à-vis the Ukraine crisis, despite the very different modalities in which they express it – to wit, both men seem determined to keep lines of communication with Putin and Moscow open.

In Orbán’s case, that determination takes the form of more-or-less explicit support for Putin, accompanied by the bombast and chest-thumping typical of populist firebrands. With Francis, it’s more a question of discretion being the better part of valor – almost two full months into the conflict, Francis still has not mentioned Russia as the aggressor, nor has he called on Putin by name to reverse course.

Francis has vowed to do “everything possible” to try to bring the war to an end, and, apparently, that includes refraining from rhetoric that would make any role for the Vatican as a possible mediator more difficult. Indeed, where others bristle at Orbán’s affinity for Putin, Francis may well see it as an asset, in the sense that at least one European leader is still taken seriously in the Kremlin and thus may be in a position to help get the Vatican’s eagerness to help across.

In other words, if Paris was worth a Mass, perhaps Francis believes that Ukraine was worth 40 minutes with Orbán. Whether the tête-à-tête actually produces any momentum remains to be seen, but the pope may have felt it was a chance he simply had to take.

Follow John Allen on Twitter: @JohnLAllenJr