President Dilma Rousseff lit the torch at the presidential palace here while school children cheered, Air Force jets looped overhead and a group of some 100 demonstrators shouted their support for the embattled leader.
The first torch bearer was Fabiana Claudino, who has led Brazil's female volleyball team to Olympic gold two times. During its spin around the country's capital, the torch was also carried by surf champion Gabriel Medina and a 12-year-old refugee girl, Hanan Khaled Daggah.
She is one of about 2,000 Syrian refugees welcomed by Brazil over the past couple of years.
After her 400-meter run, Hanan told CNN it was an exhilarating moment.
"I don't feel like a refugee, I feel like a Brazilian, a Brazilian carrying the Olympic torch!" she said, still wearing a white and gold uniform and clutching a replica torch she received as a gift.
She said she was headed home to Sao Paulo "with this beautiful torch."
"I'm going to visit other refugees and send the message to be strong and don't be afraid," she said. "All of the refugees in Sao Paulo are afraid they won't get work, they won't be able to pay rent, so don't be afraid, just believe in yourself."
Hanan and her family, who are from northeast Syria, came to Brazil in 2015 after more than two years in Jordan.
The Olympic flame now goes on a 95-day journey around the country. It will visit more than 300 towns and cities, giving about 90 percent of Brazilians the opportunity to join in and witness the historic tour.
Before arriving in Rio de Janeiro on August 4, the flame will travel tens of thousands of kilometers by road and by air and will be carried by roughly 12,000 relay runners.
The Rio 2016 Games have faced a seemingly endless string of obstacles. First came the deep recession and a Zika virus outbreak that has caused serious birth defects.
The latest hurdle: a political crisis that could see Rousseff stepping down this month to face an impeachment trial.
During the ceremony, Rousseff said that despite living through a "truly critical period, Brazil will offer athletes and visitors the best welcome for the Olympics."
Both pro- and anti-impeachment demonstrators turned out in Brasilia on Tuesday. Some carried a banner that read "SOS coup in Brazil!"
Rousseff and her supporters call attempts to have her impeached for allegedly violating budget laws an institutional coup d'etat.
Hundreds of people turned out along the torch's route on Tuesday.
But back in Rio, where the opening ceremony will be held at the Maracana Stadium on August 5, reaction ahead of the event was muted.
"Right now, people aren't thinking about the Olympics. They don't have money and they don't know what is going to happen in the future," said Katia, an unemployed lawyer.