US President Barack Obama has met Pope Francis for the first time and invited the pontiff to visit the White House.

Mr Obama made the spontaneous invitation as he was giving Pope Francis a symbolic gift of seeds from the White House garden after 50 minutes of private talks in the Pope's library.

"If you have a chance, you can come to the White House and you can see the garden," Mr Obama said to the Pope as he was explaining the gift in the presence of reporters.

The Pope, responding in Spanish, said "Como no?" (For sure).

The Catholic Church in the United States wants the pope to visit Philadelphia in 2015 for an international gathering of families.

The two men were expected to discuss closing the gap between rich and poor, as well as concerns about Ukraine and the search for peace in the Middle East, during the meeting.

At the end of their private talks, Mr Obama gave the pope a custom-made seed chest featuring a variety of fruit and vegetable seeds used in the White House Garden.

The chest is made from leather and reclaimed wood from the Basilica of the National Shrine of the Assumption of the Blessed Virgin Mary in Baltimore, which is one of the oldest Catholic cathedrals built in the United States.

Apart from the symbolic seeds donated to the Pope, the White House said seeds would be donated in the United States that will yield several tons of produce to a charity of Pope Francis's choosing.

After the meeting with Pope Francis, Mr Obama met Italian Prime Minister Matteo Renzi.

Mr Renzi told the president that looked to him as "a source of inspiration and a model" and would apply his "Yes we can" slogan to Italy.

"President Obama is not only the president of the United States, obviously, but for me and my team a source of inspiration and a model," Mr Renzi said at a joint press conference with Obama.

"The message 'Yes we can' applies to us in Italy today because we also want to say that it is possible to change things," said Mr Renzi, a centre-leftist who only came to power last month.

At 39, Mr Renzi is one of the European Union's youngest leaders and has spoken of his admiration for Mr Obama and former British prime minister Tony Blair and his "New Labour" policies.

Mr Obama said he had already met with Mr Renzi when the Italian leader was mayor of Florence and visiting the White House as part of a delegation.

"I've just been impressed by the energy and vision that Matteo is bringing to his position. There's a seriousness and ambition of ideas," Mr Obama said.