Brazil President Luiz Inacio Lula da Silva has seen one of his top officials walk away from his administration.

Reuters reported that Lula's top national security General Marcos Goncalves Dias has submitted his resignation amid the Brazil riot scandal, which saw protesters storming government buildings in the capital, according to Reuters.

Goncalves Dias was seen walking around the presidential palace. It was during the time that a mob of protesters stormed inside government buildings during the Brazil riot on January 8. His resignation was then accepted by the president.

The former top security official was believed not to have supported the invasion by supporters of former president Jair Bolsonaro in any way, according to a source close to the president.

He was head of presidential security during Lula's two previous terms.

Meanwhile, Lula's opposition noted that the footage shows that the government facilitated the rioters' entry into the presidential palace.

The former Brazilian Army general said that the reason behind his resignation was so that the administration can investigate in a transparent way.

READ NEXT: Jair Bolsonaro Is Back in Brazil After Self-Imposed Exile in Florida 

Lula's Security Official Marcos Goncalves Dias

The former top security official earlier explained that the footage had been taken out of context, saying he had been trying to peacefully de-escalate the situation.

Goncalves Dias added that he was removing people from the third and fourth floors of the building, as reported by DW.

Meanwhile, arrests were targeted to be done on the building's second floor.

The footage also showed at least two soldiers shaking hands with protesters and handing out water bottles, which Goncalves Dias argued was again taken out of context.

The former Brazilian army general stayed at the presidential palace until the arrival of Lula that evening.

One of the sources said that Goncalves Dias managed to do what was possible alone.

Goncalves Dias also argued that the footage released wanted to link him to an army captain working for his national security agency, who was seen distributing water to the rioters in the palace.

He noted that the captain and other agency staffers were already removed and facing a Supreme Court probe and internal inquiries.

Brazil Riot

The Brazil riot came after extremists loyal to the former far-right leader lost to Lula in October.

Sky News reported that it has verified and analyzed evidence from social media, which revealed how the riot unfolded.

Demonstrators called for military intervention to stop Lula from taking power and have been camped at the place since the election result was announced.

Some protesters argued that Lula is corrupt, while others believe that the election result was fixed in his favor.

At 2:30 p.m. on January 8, a crowd started to gather in the center of the complex, with a Facebook livestream showing them congregating on the grass.

The roof of the Congress building was filled with demonstrators in yellow and green, with crowds filling the Presidential Palace.

By 4:30 p.m., it was shown that the number of military members have increased in the area and dispersed rioters.

It was only until 6:30 p.m. that security forces took back the buildings.

The country's health ministry noted that 70 people were injured during the Brazil riot, with more than 1,500 people have now been arrested for their involvement.

READ MORE: Luiz inácio Lula Da Silva Launches First Anti-deforestation Raids in Amazon in Vow To Protect Rainforest in Brazil

This article is owned by Latin Post.

Written by: Mary Webber

WATCH: Security chiefs wanted over alleged collusion in Brazil riots | Al Jazeera Newsfeed - from Al Jazeera English