A year after Jair Bolsonaro supporters stormed the seat of power in Brazil, the senior justice on the country's Supreme Court says the far-right ex-president bears "unequivocal" responsibility for the unrest.
But Justice Gilmar Mendes says the court must now decide whether Bolsonaro is guilty of a crime for his alleged links to the January 8, 2023 riots, which stunned the world with striking echoes of the US Capitol invasion two years earlier.
"His political responsibility for January 8 is unequivocal," Mendes told AFP in an interview at his office in Brasilia ahead of the anniversary.
"His legal responsibility is still being examined in court."
Bolsonaro's arch-rival and successor, veteran leftist Luiz Inacio Lula da Silva, had been in office just one week when tens of thousands of protesters overwhelmed security forces to storm the presidential palace, Congress and Supreme Court.
Alleging foul play in Bolsonaro's narrow loss in Brazil's bitterly divisive October 2022 elections, they smashed through doors and windows, vandalized priceless artworks and trashed the premises, urging the military to intervene to oust Lula.
Bolsonaro, who was in the United States at the time, denies responsibility.
But the Supreme Court is investigating allegations the polarizing ex-army captain instigated the riots, including with his repeated attacks on the credibility of the election system -- which already earned him an eight-year ban from running for public office, in a separate case.
Mendes says he thinks that before Bolsonaro left office, his government "had encouraged some sort of anarchy, especially among the police forces."
"I believe the military even refrained from removing the invaders because of (Bolsonaro's) encouragement," says the 67-year-old judge, who took his seat on the 11-member court in 2002.
Mendes was in Lisbon, Portugal having lunch with a friend, fellow judge Nuno Picarra of the European Court of Justice, when he got the news of the mounting unrest in Brasilia.
He rushed to contact three people: fellow Supreme Court justices Alexandre de Moraes and Rosa Weber, and Lula's justice minister, Flavio Dino.
Mendes soon decided to cut short his trip and fly back to Brazil.
"Nobody knew just how big it was," he recalls.
"The intelligence services were still occupied by people from the previous government," he says. "Information wasn't being shared adequately. The assessment of the threat was clearly flawed."
Mendes calls the riots the result of months of verbal attacks from Bolsonaro's camp on the credibility of the electoral system and courts.
"Every day (former) defense minister Paulo Sergio was writing letters suggesting some kind of measure" to change the electronic voting system Brazil has used since 1996, according to Mendes.
"They knew the system was fraud-proof, but we still faced all that coercion. What that suggests, going by the populist playbook, is that they were looking for a pretext to annul the elections."
The Supreme Court was a frequent target of attacks from Bolsonaro, who was furious over its investigations against him, including over using state resources to spread disinformation.
The high court remains a widely hated institution on the far right in Brazil, where judges are particularly visible and even outspoken figures.
The court's headquarters were the most badly damaged of the three buildings invaded on January 8.
"A lot more hate and anger were dumped on the Supreme Court than Congress or the presidential palace," notes Mendes, one of the few justices who maintained communication with Bolsonaro during his 2019-2022 presidency.
"The propaganda worked."
Now, the tables have turned, with the Supreme Court holding the first trials of those charged over the riots.
Of the 2,170 people arrested, 30 have been convicted of crimes including an attempted coup, with sentences of up to 17 years.
"The political system is more alert now" to potential unrest, Mendes says.
But "we need reforms to prevent a repeat of the military becoming politicized and holding civilian posts in government" as they did under Bolsonaro, he adds.