Pope Francis arrived in Brazil on his first foreign trip as pontiff and was swarmed by well-wishers as he drove into Rio de Janeiro.

Welcomed by a committee of local dignitaries, including President Dilma Rousseff, Francis waved to onlookers before proceeding by motorcade to Rio's city centre at the start of a week-long gathering of young faithful in Brazil.

Thousands of local Catholics, visiting pilgrims and curious Brazilians lined avenues to greet the pope, who rode at first in a closed car with his window open.

The crush of well-wishers led to a lapse in security when crowds swarmed the car as it entered central Rio.

People surrounded the vehicle, a small silver Fiat, to take photos and touch the pontiff through his open window.

Bodyguards moved in to push back the crowd, which at one point was so heavy that the car was forced to a halt.

The pope's visit to the Atlantic coastal metropolis is part of the biennial World Youth Day gathering.

"God wished that the first international trip of my pontificate should take me back to my beloved Latin America," said Francis, an Argentine, in a speech shortly after arriving.

Tens of thousands of Argentines are expected to travel to Brazil for the event.