Police used stun grenades and tear gas to clear protesters in the path of the Olympic torch in a poor suburb of Rio de Janeiro on Wednesday, two days before South America's first Olympic Games open under tight security.

Olympic Brazilian sailors earlier delivered the torch to the host city's mayor after crossing Guanabara Bay near the end of a 20,000-kilometre journey through one of the world's largest and most diverse countries.

The flame landed on terra firma at 9:15 a.m. local time, while just kilometres away 450 heavily armed police battled drug traffickers to carry out dozens of arrest orders in the Alemao slum, an area near the international airport and close to the main road to Olympic venues.

Stepped-up security

Armed soldiers stood patrol on highways and on many corners throughout the iconic beach city in Brazil's largest security operation ever.

Brazilian garbage collector and dancer Renato Sorriso carries the Olympic torch on its way for the opening ceremony of Rio's 2016 Summer Olympics. Police dispersed protesters on part of the torch route on Wednesday. (Felipe Dana/Associated Press)

Some 85,000 police, soldiers and security personnel will be deployed in Rio, more than double the number in London in 2012, to deter both violent street crime and the threat of attacks by extremists.

Police said anti-government protesters in Duque de Caixas, on Rio's north side, threw rocks and blocked the torch's path. Police dispersed them with pepper spray and rubber bullets.

A video of the incident spurred social media criticism of the police and amplified complaints that the Games ignored the poor. A representative for the local organizing committee called the incident isolated and said the protesters had held up the torch but its route was not changed.

Three people were injured by rubber bullets, including a 10-year-old girl, local media reported. The clash, which came a day after anti-torch protests in nearby towns and amid several days of gang violence in northern Brazil, underscored social tension in the massive country.

Traffic jams

The world's largest sporting event comes to Brazil at a challenging time, in the midst of the country's worst recession in at least a quarter century and an impeachment trial of a suspended president. Many residents struggling with the dire economy question the wisdom of hosting the Olympics, a bid Brazil won in 2009 while the economy was booming.

Rio de Janeiro Mayor Eduardo Paes carries the Olympic flame amid tight security during the torch relay ahead of the 2016 Olympic Games on Wednesday in Rio de Janeiro. The flame will be carried through the streets of Rio to Maracana Stadium for Friday's opening ceremony. (Chris McGrath/Getty Images)

"The Olympics is a waste of time. The Games did not bring any benefits to Rio de Janeiro," said waiter Adriano Souza, 25, lamenting the lack of public transportation to get around the sprawling, mountainous city.

Residents have faced hours of traffic jams in recent days as new express bus lanes ferrying athletes and visitors to sport venues take up highway space, leading Mayor Eduardo Paes to declare Thursday the fourth city holiday of the Games. After picking up the torch at a local naval academy, a grinning Paes took it on its first laps through the streets of downtown Rio, known locally as "the marvellous city."

A few protesters cropped up in the mostly celebratory crowd, which cheered to the pulse of drums and samba music. In addition to balking at the $12-billion price tag, protesters are calling for more accountability from elected officials after a massive corruption scandal focused on the state oil company ensnared dozens of high-level politicians.

The economic malaise might have contributed to a larger excess supply of tickets before the Games' start than in London. The Rio Organizing Committee said 1.3 million tickets remained unsold on Wednesday, though nearly half of those tickets are for soccer matches held in other cities.

Opening ceremony on Friday

The symbol of the Olympic Games will visit more towns and return to the city centre on Thursday ahead of Friday's opening ceremony.

Some cariocas, as residents of Rio are known, said they were eager to show the world their city is ready for the international spotlight and pleased they had largely delivered venues on time. "It was easy to get here and there are plenty of police," said architect Sergio Lima e Silva, who was attending the first sporting event of the Games: a women's soccer match between South Africa and Sweden in a new stadium.

While the torch's tour through 300 cities has generally been smooth, it did spur an international outcry when authorities had to shoot a jaguar after the animal escaped from its handlers at a ceremony in the Amazon city of Manaus.

The name of the final torch bearer is a closely guarded secret, but soccer legend Pele said on Tuesday he been invited to light the Olympic cauldron on Friday and was checking availability with his sponsors.