Reaching the town of Santos on 22 July, the torch was passed to the “king of football” himself at the Pelé Museum.
The three-times world champion appeared on the balcony, displaying his Medal of the Olympic Order from the International Olympic Committee.
"I want to thank you because not everyone has this opportunity,” Pelé said. “Let's go Brazil!"
Before reaching Santos, the relay passed through the town of Itu, where Rogério de Brito, former Olympic boxer who started out collecting paper from the streets, was among the torchbearers.
“I started with athletics but it was through boxing that I travelled the world and saw myself among the best,” he said.
“I never imagined I could reach the Games but I ended up competing in two.”
Diving coach Fernando Ribeiro, who competed at Melbourne 1956, also carried the torch through the town while Magic Paula, one of Brazilian basketball’s legends, took the flame through Jundiaí.
“I thought I had lived through everything but I was thrilled again,” Paula said.
“I started crying when I got off the bus. I started playing basketball in earnest here in Jundiaí and it was here that I was called up for the national team. It means a lot to carry the flame here.”
On Friday, 22 July, the relay took to the skies above São Vicente on the town’s famous cable car before silver medalist judoka Leandro Guilheiro received a standing ovation as he carried the torch through Vila Belmiro.
Meanwhile, shooter Felipe Wu took a day off from preparations for Rio 2016 to carry the torch in Guarujá.
“The key is repetition. I believe in my chances of getting a medal for Brazil,” he said.
Passing through Guarulhos, São Caetano do Sul and Santo André en route to São Bernardo do Campo on 23 July, the torch was carried by some of the biggest names in Brazil’s Olympic team.
Arthur Zanetti, Olympic and world champion on the rings, was the first Latin American to win an Olympic gold in any of the artistic gymnastic disciplines.
And Diego Hipolito, who was the only Brazilian artistic gymnast at Beijing 2008, carried the torch in São Bernardo do Campo.
Along the route, there were sports activities and cultural performances for the public before the flame arrived in São Paulo city, the last state capital before Rio de Janeiro.
Crowds gathered to welcome the flame at the Ipiranga museum, before passing the monument to Brazilian independence.
Known as the Neymar of archery and silver medalist at the Youth Olympic Games in Nanjing, Marcus Vinícius d'Almeida, 18, was one of the athletes to carry the torch through the city and he had only one thing on his mind.
“Our group has one target: do the best. And our best has a great chance of winning a medal,” he said.
“Now, with 12 days to go, the emotion is going. Archery has to be prepared to do the best and get a good result for Brazil.”
The Rio 2016 Olympic Torch Relay has three Presenting Partners: Worldwide TOP Partner Coca-Cola, which continues its longstanding support for Olympic torch relays, and local Partners Bradesco and Nissan. For further information, please visit the Rio 2016 website.