Updated

Rio de Janeiro is scrambling to ensure the rest of Pope Francis' visit goes smoothly, seeking to avoid street chaos or metro breakdowns as the city prepares for the World Cup and Olympics.

With around 1.5 million pilgrims in town for a Catholic youth gathering and the papal visit, city chiefs are facing a new test of their ability to handle major events following football's Confederations Cup last month.

The world witnessed a tumultuous start to the pope's first trip abroad since his election when adulatory crowds were able to swarm his car and touch him on Monday. That evening, a protest ended with police dispensing tear gas.

The next day, the subway system broke down for two hours, forcing thousands to scramble to find space in buses and taxis as they headed to a huge mass on Copacabana beach that kicked off World Youth Day.

"Any explanation seems unnecessary and useless to me. What we must do is apologize," Rio Mayor Eduardo Paes said on Wednesday after officials met to review the logistical lapses.

"Measures were taken to ensure that these deplorable incidents, which saddened us, are not repeated," he said.

Rio is running against the clock to improve its infrastructure and expand its public transport system ahead of next year's World Cup and the 2016 Olympic Games.

The Confederations Cup, while a sporting success with Brazil's victory, was marked by the biggest protests in a generation as citizens denounced poor public services, political corruption and the cost of marquee sporting events.

The city faces more days of major activities, with the pope due to visit a slum Thursday and then join hundreds of thousands of pilgrims on the beach of Copacabana in the evening. More big gatherings are planned.

The Argentine pontiff's rowdy welcome was described by Brazilian media as a "security failure" and authorities admitted that bad communication contributed to the confusion. The pope's convoy took a wrong turn and got stuck in traffic.

"The responsibility lies with the public authorities: City Hall, which was responsible for security, the federal government, which was escorting," Paes said. "Thank God the pope was not under any real risk."

"The pope creates traffic jams, he attracts people," Paes added.

Pope Francis, however, appeared delighted by the exuberant reception, smiling and waving while leaving his car window open the entire time.

After his car journey, the pope hopped on an open-top jeep to continue his route through the city. His decision to ditch a bulletproof Popemobile had made local authorities nervous, though the Vatican downplayed the move.

"We shouldn't give too much importance to the car story or too much importance to the security issue," Vatican spokesman Federico Lombardi told reporters.

But the pope's program was changed after an "important meeting" regarding logistics and security between Brazilian officials and the Vatican, the spokesman said.

One of the changes came on Wednesday, when the highway between the airport and the city center was closed after the pope landed back from a visit to a shrine in the neighboring state of Sao Paulo.

Rio authorities, meanwhile, said that given the breakdown it would seek a big fine against the company that runs the city's metro.

The service, which normally stops running at midnight, announced Wednesday that it would operate 24 hours a day until World Youth Day ends on Sunday.