Brazil has faced a herculean task in processing hundreds of people detained in the country's biggest-ever once-off roundup of suspects following violent riots in the capital on January 8.
More than 1,000 will likely face charges for the invasion of the presidential palace, Congress and Supreme Court a week after the inauguration of leftist President Luiz Inácio Lula da Silva.
A prosecutor involved in the case has described the process to AFP on condition of anonymity, as he does not have authorisation to speak on the record.
More than 2,000 people were arrested immediately after the riots by backers of far-right ex-president Jair Bolsonaro.
Of these, about 300 were detained at the scene of the crime but the majority were rounded up at an encampment of Bolsonaro supporters some eight kilometres (five miles) away, where they had returned after taking part in the uprising.
Nine days later, some 1,400 remain in custody.
Men are being held at the Papuda prison and women at Colmeia, both in Brasília and both severely overcrowded as a result.
Papuda with a capacity for 1,176 detainees was accommodating 2,139, according to the latest update from the prisons authority. Colmeia had 1,148 detainees for its 1,028 capacity.
The suspected rioters were being held separately from the rest of the prison population.
"Many of them are from other cities and states and will be transferred... out of Brasília" in the coming days to await trial, said the prosecutor.
More than 600 have already been released pending further investigation – mainly elderly people, pregnant women and mothers with small children now awaiting their fate in freedom.
Federal Supreme Court (STF) Justice Alexandre de Moraes is in charge of supervising the investigation and prosecution of all the rioters.
The detainees face a variety of charges under the umbrella of "anti-democratic acts."
These include criminal association, attempting to subvert the democratic order, involvement in an attempted coup d'etat and incitement to crime, according to the Federal Police.
Among the more serious charges, involvement in a "coup d'état" carries a possible sentence of up to 12 years, according to Brazil's penal code.
There was much talk directly after the events – including from Lula – of "terrorism" charges, which carry a maximum penalty of 30 years.
However, according to the law, the crime of terrorism requires an act to have been carried out "for reasons of xenophobia, discrimination or prejudice based on race, colour, ethnicity or religion," whereas the riots were political.
"It is possible" that no "terrorism" charges will be brought in the end, said the prosecutor.
By Tuesday, some 1,400 initial custody hearings had been held to confirm that a detainee's rights and welfare are being respected.
Given the overwhelming number of suspects, all the hearings were held via video conference, with judges in Brasília receiving help from judges in other districts. The ranks of prosecutors, too, were boosted by personnel from other regions.
"It was a week of 18-hour days," said the prosecutor.
Some 100 federal prosecutors in total worked on the 1,400-odd cases. Hundreds of defence lawyers – public and private – were also involved.
"In a normal situation, with a normal crime, the custody hearing must happen within 24 hours and a judge must decide immediately" whether to free a suspect or not, the prosecutor explained. "But there is jurisprudence that in exceptional cases, this period can be extended. This is an absolutely exceptional case."
At about 1,000 of the hearings, prosecutors sought preventive detention for the accused. If granted, the conditions for continued detention must be reconsidered every 90 days. In the rest of cases, prosecutors agreed to suspects being released on bail or house arrest pending trial.
For preventive detention to be ordered, prosecutors must show that a person is likely to commit further crimes if freed: in this particular case, that they continue to pose a threat to the public order.
With the case ultimately in the hands of the STF, judge De Moraes is the one who will decide who remains in prison to await trial, said the prosecutor.
With the custody hearings all but over, the work of bringing criminal charges against the individuals will now move to the office of Bolsonaro-appointed prosecutor general Augusto Aras.
On Monday, the prosecutor general filed his first charges -- against 39 suspected rioters.
Will there be one big case or many small ones? Will the STF hear them all, or will the cases be sent back to lower courts? This must all still be decided.
What is clear, is that it will take a long time – possibly years with appeals included – for the legal process to run its course.
by Mariëtte Le Roux, AFP