Police in Brazil have clashed with protesters ahead of the Rio 2016 opening ceremony.
Large crowds forced the Olympic torch relay away from its planned route through the city's Copacabana beach.
UN Secretary General Ban Ki-moon earlier ran with the torch by Ipanema beach after receiving it from International Olympic Committee President Thomas Bach.
The flame will be used to light the Olympic cauldron on Friday night at the Maracana Stadium.
Protesters were tear gassed during clashes with riot police just hours before the Olympic opening ceremony in the latest of a series of angry demonstrations around the Rio Games.
Thousands of police had to escort the Olympic torch on its journey to the stadium as demonstrations threatened to overshadow tonight's grand ceremony, reports ITV News Correspondent John Ray.
Protesters blocked the path of the torch relay as they accused the government of ignoring political and economic crises within Brazil.
Among those chanting angrily on the streets were supporters of Brazil's ousted left-wing president and campaigners highlighting the deep split between rich and poor amid a serious recession.
"In the real Rio de Janeiro that is not on the postcards people are angry because we have a lot lacking and the government is choosing to not see," said student protest leader Gabriel de Melo.
At Copacabana beach the Olympic party was forced to dodge protests by extinguishing the iconic torch and hiding the flame in a small lamp.
However, the calls for change might be harder to avoid.
The details of tonight's Olympics opening ceremony have been tightly guarded - but one certainty is that it will be an extraordinary show.
Rio is used to putting on party and watchers can expect a taste of carnival tonight, reports ITV News Sports Editor Steve Scott.
Tens of thousands of people joined open auditions in an attempt to be a part of the grand opening.
And samba schools, dancers and costume fitters have been among those busily practicing ever since.
Performer Ernesto Magalhaes said watchers could expect "a bit of a mix".
"People will get to know a little bit of our history but they will also know about modern Brazil and our popular culture," he said.
Brazilian football star Pele will not light the Olympic Cauldron for the Rio Games opening ceremony, his spokesman has said.
There had been concerns that the legendary footballer, whose real name is Edson Arantes do Nascimento, might be prevented from taking up the honour due to poor health.
The 75-year-old has been suffering muscle pains and needs a cane to get around after hip surgery.
Today his representative Pepito Fornos said that Pele's leg muscles are "not sufficiently strong enough" - but added that he may appear at the closing ceremony.
The problem is that if he sits in a chair you need a winch to get him out of it.
His doctor thought it best that he continues physiotherapy, that he rests and we hope that he will be able to appear at the closing.
ITV News Correspondent John Ray has said there has been a "first of no fewer than seven demonstrations" in Rio de Janeiro.
The city is preparing to host the Opening Ceremony of the Olympic Games tonight, and in a tweet on Friday, said the events "threaten to overshadow the official opening".
William, Kate and Harry have released a good luck message to all Team GB athletes ahead of the Olympic Games.
Team GB have taken 366 athletes across 23 sports to Rio, and hope to better the 47 medals they won at Beijing 2008 - their best-ever away Games.
Sorry, this content isn't available on your device.
Team GB have been welcomed into the Olympic Village following a traditional flag raising ceremony.
Tennis player Andy Murray was named Team GB's flagbearer on Wednesday, and will perform his duties at the opening ceremony later tonight.
The Olympic torch has arrived at the iconic statue of Christ the Redeemer in the heart of Rio de Janeiro, ahead of the opening ceremony of the Olympic Games.
Former Brazilian volleyball player, Isabel Barroso, held the torch aloft as the city prepares to open the Games later on Friday evening.
The Sydney Opera House has been lit up in the colours of the Australian national team ahead of the opening ceremony of the Olympic Games in Rio.
The Olympic Games has a long history of dramatic, emotional and inspirational moments.Read the full story ›