- What are the reasons for the protests?
The protesters want President Michel Temer, who was placed under investigation last week on corruption charges, to resign.
Temer has been on the ropes since allegations that he tried to pay hush money to a jailed politician.
- Why have troops been deployed?
Violence erupted after the crowd, estimated by police at around 35,000 people, marched towards the presidential palace.
Although most of the protesters were peaceful, small groups wearing masks threw stones at police officers and smashed their way into the agriculture ministry.
This led to he government to deploy soldiers in the capital, which sent a psychological shockwave through Brazil, which was tuled by a military dictatorship in the 1980s.
"The question now is that you have demonstrations where you have these black blocs that started destroying a ministry," says Alfredo Vallado, a professor of Latin American geopolitics at Science Po. "The military police that is used in Brazil for this kind of event couldn't control the crowd, that's why the government called the troops. But obviously, in this moment it becomes political, which is why everybody is yelling about it."
- Who is behind the protest?
The demonstration was organised by left-wing groups and trade unions, who were also protesting against austerity measures.
Brazil has been stuck in deep recession for the last two years and also in a state of political instability.
Temer's troubles came just a year after he took over from Workers' Party leader Dilma Rousseff. She was impeached at the time for illegally manipulating government accounts.
"There have been people coming in from all over the country," says Tom Long, a lecturer in international relations at Britain's University of Reading. "A lot of this is probably organic, some of it is supported by opposition parties, but the Fuera Temer [Temera out!] movement has gained such strengh over the last year, so I think a lot of this protest should be seen as happening organically."
- Could these protests lead to Temer's resignation?
For now the president is trying to shore up his congressional alliance to resist calls for his impeachment. He claims to have done nothing wrong and says he will not resign.
But intense negotiations are going on behind the scenes, analysts say, to find the least traumatic way possible for Temer to be eased out.
"I don't think he will stay," says Sonia Fleury, a political analyst at thinktank FGV. "His situation is very fragile because he has no real support from his coalition. They are trying to find a solution that will gather different political forces and that's not easy."
- What happens if Temer resigns?
"There's two possibilities: either indirect elections, which would be held in Congress where a placeholder president is elected," explains Tom Long. "If Temer is removed because the last elections are cancelled, then that would open up general elections. [Former President] Lula said he would contest them and polls show him in the lead."
For now the only certain thing is that there will be more protests in the coming days and weeks.