Torch surfs its way into Rio as protests hit ahead of Olympics

Riot police used stun grenades and tear gas to clear protesters in the torch's path in a poor suburb.

FILE: Brazilian former footballer Lucio (R) and Brasilia's governor Rodrigo Rollemberg receive the Olympic flame from fireman Haudson Alves at the field of the Brasilia National Stadium in Brasilia on 3 May 2016. Picture: AFP.

RIO DE JANEIRO - Veteran Brazilian surfer Rico de Souza rode waves with the Olympic torch on Thursday as the flame makes its way back to Rio de Janeiro for Friday's opening ceremony, under the cloud of angry demonstrations by some residents in recent days.

Riot police used stun grenades and tear gas to clear protesters in the torch's path in a poor suburb on Wednesday evening. A video of the incident spurred online criticism of authorities and fuelled complaints that the Games have ignored the city's poor.

Coming amid the worst recession since the 1930s, the clashes underscored the social tensions simmering in the first South American country to host the Olympics. On Wednesday, hundreds of police had battled drug gangs in a Rio slum while in the country's distant north, riots raged for a fifth day.

The atmosphere on Macumba beach, however, showed Rio's light and fun loving side, with hundreds of fans cheering on Souza as he did laps on the sand after carrying the torch out of the ocean.

"It was incredible for us. We've been waiting for a long time for the Olympics and for surfing to be part of the Games," local surfer Milton Roberto said, a day after the International Olympic Committee (IOC) announced surfing would be one of five new sports included in the 2020 Olympics.

Some 500,000 foreign visitors are descending on the iconic beach city. They are protected by 85,000 police and soldiers, more than double the number of security personnel in the 2012 Games in London.

Heavily armed soldiers guarded the Maracana stadium, host of the 2014 soccer World Cup final, on Wednesday during a test run of the opening ceremonies that lit up the skies with fireworks.

The opposition has called a demonstration against interim President Michel Temer's government for Friday outside the stadium, accusing him of conducting a 'coup' against suspended leftist President Dilma Rousseff, who is being placed on trial in the Senate.

The volatile political situation added to concerns over rampant crime levels in Rio, water pollution, late infrastructure and an outbreak of the Zika virus in northern Brazil that clouded the build up to the Games.

The Olympic soccer competitions kicked off on Wednesday, and host Brazil got off to a winning start when its women's team beat China 3-0. Soccer is the only sport with games taking place outside the host city.

Civil police in the capital of Brasilia called a 48-hour strike on Thursday, when the Brazilian and South African men's teams face off.

Special operations forces will provide security, the federal district's security department said.

WATCH: Rio 2016: Protests mar Olympic torch arrival