Pope Francis speaks with President Obama during a private audience on March 27, 2014 at the Vatican. SAUL LOEB/AFP/Getty Images

When President Obama welcomes Pope Francis to the White House next week, nobody will be watching more closely than the nation’s 79 million Catholics, most of whom admire and respect their religious leader but have a much more conflicted view of their political leader.

Twice, they voted for Obama, but not by big margins. Several times, their institutions have sued him, but not with great success. And all this while their bishops have alternated between strong denunciations of parts of his health care law and enthusiastic endorsements of his immigration and Iran policies. “Obama has largely been perceived as someone who has not been a friend of the Catholic Church in America,” said Chad C. Pecknold, who teaches in the School of Theology and Religious Studies at The Catholic University. The relationship, he told National Journal, is “complicated.”

But the president appears to have found an ally in Francis.

Behind the scenes, the two leaders worked together to end the five-decade estrangement between the United States and Cuba. The president has welcomed the pope’s emphasis on fighting poverty and his de-emphasis of ecclesiastical scolding on social and sexual matters. Obama also cheered Francis’s encyclical declaring that climate change is mostly man-made. “I think when he meets with the president, I expect there to be a warm personal exchange and that it will be viewed as an exchange between persons who like each other,” said Pecknold.

That kind of big-picture bonhomie and diplomatic nicety almost certainly will dominate the sessions Wednesday when Francis becomes the third pope to visit the White House. No one expects the pope to go into the details of the many issues that have the U.S. Catholic bishops at odds with the administration. But never far from any discussion between Obama and U.S. Catholics is the Health and Human Services mandate in the Affordable Care Act that requires health insurance plans to provide coverage for contraceptives, including some abortifacients such as the “day-after pill.”

The Catholic hierarchy felt it was misled by the White House into believing some exemption could be given Catholic institutions, including hospitals, schools, and Catholic Charities. Cardinal Timothy Dolan of New York, who had been working with the White House, stated that the bishops could have been the “biggest cheerleaders” for Obamacare had the exemptions been granted. Instead, they are among the biggest critics, often going to court to avoid the mandate.

“We see the Little Sisters of the Poor versus the U.S. government,” said Pecknold. “We see these stories which look like the Obama administration has been very heavy-handed with the Church, not interested in providing exemptions it is quite happy to give to businesses but not to the Church. ... It has been the agenda of this president to push a total acceptance of the HHS contraceptive mandate on celibate nuns. It just doesn’t look good for Obama.”

Today, Obama’s approval ratings pale next to the pope’s. In June, the Pew Research Center broke his approval numbers down by groups. Obama had an approval rating of 47 percent among white Catholics compared to 42 percent among whites overall. He also enjoyed a 74 percent approval from Hispanic Catholics. In contrast, Francis is exceedingly popular in the United States—even after suffering a drop in his numbers when many conservatives protested his climate-change encyclical. A Quinnipiac Poll taken Aug. 20-25 showed that 66 percent of Americans have either a favorable or very favorable view of the pope. That poll showed 87 percent of Catholics and 61 percent of Protestants approving.

The fight over the mandate was raging in 2012 even as the president was appealing for Catholic votes in key states like Ohio, Colorado, Wisconsin, and Florida. But for the fifth time in the last six presidential elections, the candidate who won the Catholic vote won the election. (The only exception was 2000 when Al Gore won the Catholic vote but lost in the Electoral College.) On Election Day 2012, Obama saw a slight drop in his share of the Catholic vote from his first election in 2008. He received 50 percent of the Catholic vote, down four points from 2008. Among white Catholics, he suffered a seven-point drop, getting only 40 percent of the vote compared to 47 percent four years earlier. That was still a better showing than Obama enjoyed from white voters overall, at only 39 percent. From Hispanic Catholics, the president received 75 percent, up three points from 2008.

Even with those strong numbers, 2012 is viewed as a potential turning point in the relationship between Catholics and the Democratic Party. Before 2012, there had been a fraying of the ties between Catholics and the party that most of their parents and grandparents automatically aligned with. But for some, the party’s convention in Charlotte was particularly unsettling, with what seemed to be a nightly parade of supporters of abortion rights, gay marriage, and the HHS mandate. Even worse was the embarrassing dispute when the platform writers stripped the phrase “God-given” out of the platform, forcing a public debate on whether to restore God to the party.

When some on the floor loudly booed the vote on God, it was too much for some Democrats. Bishop Thomas Tobin of the diocese of Providence in Rhode Island, spoke for them when he announced he was dropping his longtime registration as a Democrat and becoming a Republican. “I just can’t be associated structurally with that group, in terms of abortion and NARAL and Planned Parenthood and the same-sex marriage and the cultural destruction I saw going on,” he said, adding, “The a-ha moment for me was the 2012 Democratic National Convention. ... It was just awful.”

Jay W. Richards, who teaches at the School of Business and Economics at The Catholic University, said what many remembered from Charlotte was “that booing of God.” But, he added, “It was really over the course of the convention you remember the robust defense of abortion rights. I really think it was the culmination of the Affordable Care Act and lack of accommodation on these provisions on abortifacient drugs. ... For the president, surely he could come up with an exception for this. But he dug in his heels and he made it very difficult for a practicing Catholic.”

Luckily for Obama and the Democrats, many American Catholics do not really practice what the Church preaches on matters of birth control, homosexuality, and abortion. For Catholics who emphasize acts of charity and fighting poverty, Obama has distinct appeal. And Francis is the pope they have been waiting for.

The president referred to this when he addressed the Catholic-Evangelical Leadership Summit on Overcoming Poverty at Georgetown University in May. Noting that his first job in Chicago was for a Catholic social-justice organization, with his office in a Catholic church, Obama said fighting poverty should be central to any ministry. “When it comes to ... what’s the thing that is really going to capture the essence of who we are as Christians or as Catholics or what have you, ... this is oftentimes viewed as a ‘nice to have’ relative to an issue like abortion.”

Instead, he said religious leaders have to focus on actions in the community. “Nobody has shown that better than Pope Francis, who I think has been transformative just through the sincerity and insistence that he’s had that this is vital to who we are, this is vital to following what Jesus Christ, our Savior, talked about,” said Obama. That, he said, is why Francis has “such incredible appeal” to young people. “And,” Obama concluded, “I hope that is a message that everybody receives when he comes to visit here. I can’t wait to host him because I think it will help to spark an even broader conversation.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.