Rio Transportation Secretary Carlos Osorio said the Fiat that Francis was riding in from the airport to the city center inadvertently turned into the wrong side of a 12-lane thoroughfare, known as Avenida Presidente Vargas.
Instead of taking the left lanes that were free of traffic, the car turned into the right lanes cluttered with buses and taxis, forcing the pontiff's car to stop, he said.
Thousands of faithful who lined the streets then rushed the car, reaching into the pope's open window, many taking photos of him with their phones.
The Vatican spokesman, the Rev. Federico Lombardi, acknowledged that the pope's motorcade took a wrong turn but he said the pope was never concerned for his safety, even if his secretary who was sitting with him in the car was.
"His secretary was afraid, but the pope was happy, with his hand out the window waving," Lombardi said.
He minimized the concerns, saying the mob scenes were merely an expression of the "enthusiasm" of the crowds.
"There are no concerns for security. The concerns are that the enthusiasm is so great that it's difficult to respond to so much enthusiasm for the pope. But there is no fear and no concern," Lombardi told reporters.
The wrong turn taken by the pope's driver and ensuing mob scene didn't explain, however, the clear lack of security later as Francis rode in his open-air vehicle that was also surrounded by screaming faithful.
A police officer patrolling in Rio's center after the pope had passed said that "security was clearly inadequate, the pope was too exposed."
The officer, who would not give his name saying he was not authorized to speak to the press, also said that for security reasons Francis should not be using the open-air popemobile.
"But he chose it this way. It seems he likes the contact with the people," the officer said.
Oswaldo Chaves, a 40-year-old Catholic who saw the papal motorcade, dismissed concerns about the pontiff's security and how the scene might be viewed outside Brazil.
"That was only the happiness of the people, the affection of the people for the pope," he said. "Any criticism would be wickedness against Brazilians."