Barack Obama presents Pope Francis with a custom-made chest featuring a variety of fruit and vegetable seeds from the White House garden. Photograph: Saul Loeb/AFP/Getty Images

On Thursday Pope Francis met a man who wields the kind of power and influence in his own country that many world leaders would envy. Before that, he found time to slot in the president of the United States.

Or rather, that was the impression left by the Vatican's official bulletin, which gave the archbishop of Antananarivo, Monsignor Odon Marie Arsène Razanakolona, and a collection of other Madagascan bishops 15 lines, while allotting just one to Barack Obama "and entourage".

The US president last swept into the Vatican in 2009 on a tide of Obama-mania. Since then, with his poll ratings down and mid-term elections looming, his fortunes have ebbed while the Vatican's latest incumbent could claim to be the new global idol.

After the pope ushered him into his study, he continued to gush: "It's a great honour. I'm a great admirer. Thank you so much for receiving me." The "smiling pope" muttered his reply in such a low voice that it was inaudible.

Obama had arrived at the Vatican in a cavalcade of more than 50 vehicles. Several were packed with men dressed in black and, disconcertingly, wearing masks. It was not immediately clear if they were Italian special forces attempting to confuse potential terrorists or American secret service agents trying to hide the effects of a more than usually gruesome hangover.

A White House correspondent who was travelling with Obama tweeted that the huge, bulletproof presidential limousine – which is nicknamed The Beast – was too big to get through the gates of the Vatican, meaning that the president had to enter the courtyard of the apostolic palace in a relatively modest black four-wheel drive.

There he encountered more men in black: the pope's gentlemen-in-waiting wearing tail coats.

The men escorted Obama upstairs and through the papal apartments as Monsignor Gänswein, the prefect of the apostolic household, chatted to him merrily and an officer of the Vatican's Swiss Guard preceded them in a slow march.

Obama, who spent almost an hour with the pope, had earlier signalled in an interview with the Italian newspaper Corriere della Sera that he hoped to focus on their common ground: tackling poverty and inequality. There was no mention of his recent decision regarding the NSA. But it was clear from a Vatican statement issued afterwards that the pope had expressed his distaste for some of the administration's policies regarding abortion and contraception.

It said that their talks had dealt with "the exercise of the rights to religious freedom, life and conscientious objection", and that the leaders discussed immigration reform, an issue on which Obama has won considerable support from many of America's Hispanic Catholics.

With it being customary on these occasions for heads of state to proffer gifts, Obama gave the pope some seeds from the White House garden to mark the public opening of the pontifical gardens of the apostolic palace.

"I think these are carrots," the president said.

Obama received a couple of medallions in return. But then Francis – by now visibly more relaxed and cheerful – sneaked in a leather-bound copy of his exhortation published last year, Evangelii Gaudium.

"You know I actually will probably read this when I am in the Oval Office when I am deeply frustrated and I am sure it will give me strength and calm me down," said the president, smiling broadly.

"I hope," replied Francis.

Obama may find the papal exhortation even more stimulating than he expects; it contains the most virulently worded attack ever made by a pontiff on the subject of the darker side of capitalism: consumerism, "the idolatry of money" and "ideologies which defend the absolute autonomy of the marketplace and financial speculation".

A good read in the Oval Office, perhaps. But perhaps not one that would be appreciated by some of the Democratic party's donors.