Updated January 12, 2023 at 1:49 PM ET

BRASÍLIA, Brazil — Less than two weeks on the job, Brazilian President Luiz Inácio Lula da Silva faces an incredible challenge: the aftermath of the most serious assault on the country's institutions since its return to democracy from dictatorship in the 1980s.

Now his government is widening its investigation of how thousands of supporters of the former far-right president, Jair Bolsonaro, rampaged through the Congress, presidential palace and Supreme Court buildings on Sunday in Brasília.

Echoing the ex-leader's false claims, the rioters accused Lula of stealing the election and hoped to create enough chaos that the military would intervene and reinstate Bolsonaro, which did not happen. There's no evidence of fraud in last year's two rounds of election won by Lula.

Since the weekend, demonstrations have sprung up in parts of the country sending a message of support for the Lula government. The authorities have braced for the possibility of another "mega-protest" against the government that hasn't materialized.

Here are some of the latest developments and what could happen next.

What's happening to those detained after the riots?

Officials say more than 1,000 people detained since Sunday's riots by Bolsonaro supporters remain in custody. Hundreds are held at a gym on federal police grounds in Brasília. Detainees, who were allowed to keep their cellphones, have posted videos complaining about the conditions and overcrowding in the gym. More than 600 people were released for humanitarian reasons, most of them older people, parents with children and people with poor health conditions. Hundreds of others were formally charged and sent to jail. According to officials, those arrested could face charges ranging from trespassing to damaging national patrimony to insurrection.

Pro-Lula demonstrators in São Paulo and other cities in Brazil have taken to the streets, many chanting "no amnesty" for the rioters.

Are any officials held responsible?

The authorities have arrested one ex-security official, Col. Fábio Augusto Vieira, who was fired as the head of the military police in Brasília. And they issued an arrest warrant for another: the former head of Brasília's police force, Anderson Torres.

A close ally of the former leader, Torres was Bolsonaro's justice minister before being appointed to lead the police. Torres wasn't in Brazil on Sunday — but vacationing in Florida. Ricardo Cappelli, the federal official appointed head of security since Sunday, told CNN's Portuguese-language affiliate in Brazil that Torres allegedly sabotaged Brasília's police force by gutting its leadership before leaving the country. Torres has called the accusations of collusion "absurd." In a tweet on Tuesday, he said he'll return to Brazil and face justice.

President Lula fumed during a meeting this week with governors at the damaged presidential building that the state police acted negligently — even accusing some officials of colluding with the rioters.

Now federal prosecutors are seeking investigation of three congressional allies of Bolsonaro for allegedly helping incite Sunday's assault in the capital, Reuters reports.

Authorities also say they have identified businessmen around the country who allegedly helped finance the attacks, specifically by chartering buses to bring rioters into Brasília. More than 100 buses went to the capital over the weekend packed with Bolsonaro supporters.

Did authorities know the mob was coming?

Since Bolsonaro's Oct. 30 election defeat, many of his ardent supporters have staged protests, blocking highways and camping out in front of army compounds around the country, calling for the military to take control. Analysts who monitor right-wing extremism say their coded messages online made it clear what was coming.

Natalia Viana, of the investigative journalism group Agência Pública, says Bolsonaro followers widely discussed calls to mobilize in the capital in private group chats and openly on social media. Officials had to have seen the communications, she says.

For example, organizers urged people to head to the capital for "Selma's party" — a play on words in Portuguese for a military call to action — among other coded messages in the lead-up to Sunday.

Officials said Wednesday they were blocking access to the main plaza in Brasília where government buildings are as a precaution after a flyer promoting a "mega-protest to retake power" was circulating on social media.

Is Bolsonaro heading back to Brazil?

Bolsonaro left Brazil for the United States just days before the Jan. 1 presidential inauguration for Lula. He is reported to be staying at a condo belonging to a supporter near Orlando, Florida. He condemned the "invasions of public buildings" on Twitter hours after the riots began Sunday, and rejected accusations that he had encouraged supporters to carry them out. But this week he reposted a message on Facebook again saying Lula wasn't legitimately elected, then the post was taken down.

On Tuesday, Bolsonaro told the CNN Brazil affiliate that he would return home from Florida earlier than planned but did not say when.

Pressure's growing for him to go soon. More than 40 Democratic lawmakers signed a letter sent to President Biden Thursday, urging the administration to revoke any visa granted to Bolsonaro. The letter also said federal agents should investigate possible financing and organizing that may have occurred on U.S. soil to help carry out the attack on Brazil's government. While the State Department would not confirmed it, the lawmakers and many news reports speculate that Bolsonaro entered the U.S. on a visa for foreign officials.

Bolsonaro narrowly lost his bid for reelection. He still has backing from his conservative party, as well as from some right-wingers in the U.S., including Fox News host Tucker Carlson and Steve Bannon, the ex-adviser to former President Donald Trump.

But analysts say Bolsonaro's political future, and that of his far-right movement, was greatly hurt by the Brasília assault. And Lula's immediate political outlook may get a boost as politicians from many sides — and countries — express solidarity in the aftermath of the riots.

Copyright 2023 NPR. To see more, visit NPR.