Brazil’s Supreme Court ordered the preemptive arrest of former president Jair Bolsonaro on Saturday, with a judge claiming he was intent on escaping just days before he was set to begin his 27-year prison sentence for leading a coup attempt.

The 70-year-old politician was taken to the headquarters of the country’s federal police in the capital, Brasilia, from his house arrest.

Supreme Court Justice Alexandre de Moraes, who oversaw the case, said in his ruling that Bolsonaro’s ankle monitor, which he has worn since July 18 for being deemed a flight risk, was violated at 12.08am on Saturday (2.08pm AEDT).

A file photo shows Jair Bolsonaro at the entrance of his home where he was under house arrest in Brasilia. (AP)

“That information shows the intent of the convict to break the ankle monitoring to assure his escape is successful, which would be made easier by the confusion that would be caused by a demonstration organized by his son,” the justice said.

He also said the arrest “should be made with all respect to the dignity of former President Jair Messias Bolsonaro, without the use of handcuffs and without any media exposition”.

Bolsonaro’s aide Andriely Cirino confirmed to The Associated Press that the arrest took place about 6am on Saturday, only hours after de Moraes made the unexpected decision.

The former president was taken from his house in a gated community in the upscale Jardim Botanico neighbourhood to the federal police headquarters, Cirino said.

De Moraes mentioned in his ruling a video published this week by Senator Flávio Bolsonaro, one of the former president’s sons, in which he egged on supporters to take to the streets in his father’s defence.

“The video shot by Flávio Bolsonaro stimulates the disrespect to the constitutional text, to the judicial decision and to (democratic) institutions, showing there’s no limits for the criminal organisation in its attempt to create chaos and conflict in this country, in a total disrespect to democracy,” de Moraes wrote.

Federal Police headquarters, where Bolsonaro is being held. (AP)

“Brazil’s democracy has reached sufficient maturity to steer away and prosecute pathetic illegal initiatives to defend the criminal organisation that is responsible for a coup d’etat attempt in Brazil,” he added.

Some of Bolsonaro’s supporters, who claim he is being politically persecuted, are expected to rally outside the federal police headquarters throughout the weekend.

A divisive figure in Brazil’s politics

Bolsonaro was placed under house arrest in early August, weeks before he was convicted in his coup trial. His lawyers were pleading with Brazil’s Supreme Court to keep him at home to serve his sentence, citing his poor health.

Local media reported that Bolsonaro, who was Brazil’s president from 2019 to 2022, was expected to begin serving his sentence sometime next week after the far-right leader exhausted all appeals of his conviction for leading a coup attempt.

Saturday’s preemptive arrest does not mean Bolsonaro will remain at the federal police headquarters to serve his sentence. Brazilian law requires that all convicts start their sentences in prison.

The former president and several of his allies were convicted by a panel of Supreme Court justices for attempting to overthrow Brazil’s democracy following his 2022 election loss to President Luiz Inácio Lula da Silva. Prosecutors said the coup plot included plans to kill Lula and to encourage an insurrection in early 2023.

The Statue of Justice stands in front of the Supreme Court in Brasilia, Brazil. (AP)

Bolsonaro was also found guilty on charges of leading an armed criminal organisation and attempting the violent abolition of the democratic rule of law. Bolsonaro has denied wrongdoing.

He remains a key figure in Brazilian politics, despite being ineligible to run again at least until 2030, after a separate ruling by Brazil’s top electoral court. Polls show he would be a strong candidate in next year’s vote if allowed to run.

Bolsonaro is an ally of US President Donald Trump, who has called his trial a “witch hunt”. Bolsonaro was mentioned in a July order by the US administration raising tariffs on several Brazilian exports by 50 per cent. Trump on Friday dropped most of the higher tariffs on Brazilian exports.