The chief of security to Brazilian President Luiz Inacio Lula da Silva has resigned, after surveillance videos emerged showing him inside the presidential palace during January riots after Lula's election victory.
General Marcos Edson Goncalves Dias quit following the reports, first aired on CNN Brasil, that included footage of him opening doors and showing the way to rioters in the presidential palace in Brasilia.
Lula's government's press office announced the general's resignation on Wednesday.
The palace was one of several federal buildings stormed by supporters of former President Jair Bolsonaro days after he left office.
General had said he was showing people the exit
Dias had earlier attempted to explain the footage publicly.
He told broadcaster El Globo that the pictures had been taken out of context and that he had been trying to peacefully de-escalate the situation.
"I entered the palace after it was raided and was removing people from the third and fourth floors so that the arrests could take place on the second floor," Dias told GloboNews.
Dias had also said footage appearing to show at least two soldiers shaking hands with protesters and handing out water bottles were taken out of their wider context.
Riots reminiscent of post-election chaos in US
On January 8 this year, after President Lula's narrow election victory over his predecessor Bolsonaro, Bolsonaro's supporters invaded the supreme court, the national parliament and the presidential palace.
The scenes drew comparisons with the January 6, 2021, unrest in Washington D.C. after former US President Donald Trump's election defeat to Joe Biden.
Lula, who had been sworn in a week earlier, soon said there were indications that parts of the military and police might have helped the rioters.
Bolsonaro is a former soldier known to have strong ties with Brazil's military and law enforcement. Some members of the military have since been arrested or fired.
Dias was no newcomer to Lula's circle, having been part of his security teams during his first two terms, from 2003 and 2009, as well. Following his election, Lula appointed Dias the head of Brazil's Institutional Security Bureau (GSI), which is responsible for presidential security.
Dias will be succeeded by Ricardo Cappelli on an interim basis, the government said on Wednesday.