A far-right former army captain has been sworn in as Brazil's new president in the capital Brasilia.
Jair Bolsonaro, 63, won the presidential election by a wide margin against Fernando Haddad of the left-wing Workers' Party on 28 October.
Mr Bolsonaro was propelled to victory by his campaign promises to curb Brazil's rampant corruption and crime.
But he has proven a deeply divisive figure whose racist, homophobic and misogynistic remarks have angered many.
On a day filled with pageant, he travelled from Brasilia Cathedral to Congress in an open-top vintage Rolls Royce escorted by cavalry on white horses and jogging security guards, as crowds of supporters cheered.
"I came here just for the inauguration," supporter Antonio Vendramin told AFP news agency.
"I made a lot of money and saved money to buy the ticket, to be able to buy the plane ticket because it's a long way to come by car but we managed to make it all the way to be here on this day for President Bolsonaro's inauguration. We're full of pride."
Secretary of State Mike Pompeo is representing the US at the inauguration, and Prime Minister Benjamin Netanyahu is there for Israel. Hungary's Prime Minister Viktor Orban is the only leader from the European Union due to attend.
Mr Bolsonaro has been scathing in his criticism of the left-wing governments of Cuba, Nicaragua and Venezuela, and cancelled invitations to their leaders.
Despite portraying himself as a political outsider during his campaign, Mr Bolsonaro served seven terms in Brazil's lower house of Congress, the Chamber of Deputies, before being elected president.
He has been a member of several political parties but is currently in the Social Liberal Party (PSL), which has grown from having a tiny presence in Congress to becoming the party with the second largest number of deputies in the lower house.
Before becoming a politician, Mr Bolsonaro served in Brazil's military, where he was a paratrooper and rose to the rank of captain.
During the election race in September, he was stabbed by a knifeman at a rally and seriously injured, taking more than a month to recover.
During his time as a lawmaker, Mr Bolsonaro represented the interests of the armed forces and since his election he has named seven former military men to key ministries.
He has also expressed nostalgia for the time when Brazil was under military rule and the hard-line policies enforced during the period in which thousands were jailed and tortured.
He has praised that era as a "glorious period" in Brazil's history.
Brazil only returned to democracy in 1985 after more than 20 years under military rule and some critics see his election as a threat to the country's democracy.
Since being elected, Mr Bolsonaro has repeatedly stated that he he is committed to democracy and that he will abide by Brazil's constitution.
But previous comments he has made endorsing the use of torture and disparaging women, gay people and Afro-Brazilians have left many Brazilians worried.
The election campaign which brought him to power has left the country deeply divided into those who see him as the man to put Brazil on to the right track after massive corruption scandals rocked the country and those who fear he could lead Brazil into an authoritarian future.
Mr Bolsonaro's key campaign promises were to drive down crime and to stamp out corruption, which has seen scores of top businessmen and high-ranking politicians, including former President Luiz Inácio Lula da Silva, jailed.
In order to achieve the former, he wants to loosen laws on gun ownership so that "honest citizens" can carry arms and "protect themselves".
On Saturday, he tweeted that he would issue a decree to allow citizens who do not have a criminal record to own guns.
Days after being elected, he picked Brazil's most famous anti-corruption judge, Sergio Moro, as his minister of justice.
Mr Moro, who has been the key force behind the massive Car Wash corruption investigation, accepted despite having said in the past that he would never enter politics.
While the move was welcomed by some who see Judge Moro as a relentless fighter against corruption others criticised the judge for "abandoning" his corruption investigation.
Environmentalists were aghast when Mr Bolsonaro announced that as part of his drive to streamline Brazil's government, he would merge the ministry of agriculture and that of the environment.
Mr Bolsonaro argued that such a move would cut down on the red tape farmers faced but environmentalists feared that it would erode the protection of the Amazon rain forest.
Days after his election and in the face of severe criticism by the then-ministers of the environment and agriculture he backtracked on the issue.
Just days before the second round of the election, he also revoked a pledge to quit the Paris climate accord, which sets targets for cutting greenhouse gases.
The man he has named as his environment minister has since confirmed that Brazil will remain part of the Paris Agreement.