VATICAN CITY — President Barack Obama called himself a “great admirer” of Pope Francis as he sat down at the Vatican Thursday with the pontiff he considers a kindred spirit on issues of economic inequality. Their nearly hourlong first meeting comes as Obama’s administration remains deeply split with the church over abortion and contraception.

Obama arrived at the Vatican amid the pomp and tradition of the Catholic Church, making his way to greet the pope after a long, slow procession through the hallways of the Apostolic Palace led by colorful Swiss Guards and accompanied by ceremonial attendants. The president bowed as he shook hands with the pontiff in the Small Throne Room, before the two sat down at a wooden table in the Papal Library.

“It is a great honor. I’m a great admirer,” a broadly grinning Obama said. “Thank you so much for receiving me.”

The two were scheduled to meet for just half an hour, but their private discussion lasted 52 minutes. Obama seemed buoyed by the meeting as they emerged and the pope greeted a handful of Obama’s senior advisers. Obama’s Catholic secretary of state, John Kerry, pronounced himself “a great admirer of everything you’ve been doing, as a Catholic, for the church.”

The president and pope both appeared tense at the start of the audience, when they initially greeted one another, but then were all smiles by the end of the meeting and seemed to have found a rapport, though they spoke through interpreters.

They exchanged gifts, with the pope offering Obama two medallions and a copy of his apostolic exhortation “The Joy of the Gospel,” in which he denounced the global economic system that excludes the poor.

“You know, I actually will probably read this when I’m in the Oval Office, when I am deeply frustrated and I am sure it will give me strength and will calm me down,” Obama said.

“I hope,” the pope responded.

Obama presented the pope with a seed chest with fruit and vegetable seeds used in the White House Garden, mentioning that he heard the pope is opening the gardens at the papal summer residence to the public. The chest was inscribed with the date of their meeting and is custom-made of leather and reclaimed wood from the Baltimore Basilica – one of the oldest Catholic cathedrals in the U.S.

“If you have a chance to come to the White House, we can show you our garden as well,” Obama said. The pope responded “Why not,” in Spanish. Obama later joked that there’s more pageantry surrounding a Vatican visit than at the White House. “His Holiness is probably the only person who has to put up with more protocol than me,” Obama said.

In a brief departure from all the formality, the support stilts being used to prop up a gift from Francis repeatedly gave way, causing an audible crash that captured Obama’s attention. Eventually, aides gave up on using the stilts to hold up the gift.

As Obama departed, he said to the pope, “Muchas gracias.” Then in English he added: “Please pray for me and my family.”

It was an echo of how Francis usually ends his meetings, asking for people to pray for him.

“They are with me on this journey,” Obama said of his family. He said his wife and children “have to put up with me.”

As they met, the six-year president, with his sinking poll numbers, wouldn’t have been blamed for seeking some reflected glory from a pope who, one year into his pontificate, is viewed as an agent of change in the Roman Catholic Church. In Francis, the White House sees the popular pope and his emphasis on economic disparity as a form of moral validation of the president’s own economic agenda.

“Given his great moral authority, when the pope speaks it carries enormous weight,” Obama said in an interview with the Italian daily Corriere della Sera published ahead of his papal visit. “He can cause people around to the world to stop and perhaps rethink old attitudes and begin treating one another with more decency and compassion.”

After leaving the Vatican midday, Obama made his way to Rome’s Quirinal Palace for meetings and a working lunch with Italian President Giorgio Napolitano.

Obama is the ninth president to make an official visit to the Vatican. His audience marks a change of pace for the president, who has devoted the past three days of a weeklong, four-country trip to securing European unity against Russia’s aggressive posture toward Ukraine.

Obama visited Pope Benedict XVI in 2009, a cordial meeting with his wife and daughters that nevertheless drew attention to the differences between the church and Obama on abortion. Obama recalled that visit after leaving Pope Francis to meet with Cardinal Pietro Parolin, the Vatican secretary of state, but got the year wrong. He said it was in 2010, when it was in 2009. Parolin didn’t correct him.

To be sure, the relationship between the Obama administration and the Catholic Church is a fraught one. And Vatican officials say Obama would not leave without hearing Francis’ opposition to Obama’s health care law and its mandates for contraception coverage. The Supreme Court this week seemed divided when hearing arguments in a case in which companies argued that they have religious rights and can object to such coverage based on such beliefs.

Anticipating that the issue will be a topic of their meeting, Catholics for Choice published an ad Thursday in the International New York Times as an open letter to Obama declaring that “Francis’ interpretation of church teachings does not represent that of the majority of Catholics, especially on issues related to sexuality, reproductive health and family life.”

Francis faithfully backs church teaching on abortion – he has said he’s a “son of the church” – but his emphasis and tone are elsewhere. He has said he wants his church to be more of a missionary, welcoming place for wounded souls rather than a moralizing church.

He caused a fuss in November when he decried some conservative economic theories as unproven. “The excluded are still waiting,” he wrote.

Francis’ attention to poverty has also captured the attention of Republicans in the U.S., prompting some to stake out high-profile anti-poverty positions. House Speaker John Boehner, R-Ohio, has extended a formal and open invitation to the pope to address Congress when he visits the United States.

No doubt there is a political dimension to Obama’s visit as well. The president won the Catholic vote in both of his elections, helped by heavy support from Hispanic Catholics. Some of that support has since waned.

Meanwhile, the Pew Research Center found that the pope remains hugely popular, with more than 4 out of 5 American Catholics saying they view the pontiff favorably.