Brazil’s attorney general has said foreign meddling in his country’s institutions and democracy “cannot be tolerated” after a Guardian report revealed how the Trump administration was pushing to direct funds to a campaign against the Brazilian supreme court.

Writing on X, Jorge Messias called the report “an important alert for Brazilian sovereignty”. “The information is especially serious in light of Brazil’s electoral process and the recent episodes of external pressure on our institutions,” Messias added.

Brazil is three days away from its presidential election – the outcome of which Washington has been accused of trying to influence – where the leftwing incumbent, Luiz Inácio Lula da Silva, will face off against his far-right rival, the Trump ally Flávio Bolsonaro. The pair are neck and neck in the polls.

According to the Brazilian television network GloboNews, the attorney general’s office on Thursday filed a criminal complaint to investigate potential wrongdoing, in response to the Guardian story.

Last year, the Trump administration used a campaign of sanctions and tariffs in a failed attempt to pressure Lula’s government and the supreme court over the coup trial of Bolsonaro’s father, the ex-president Jair Bolsonaro. Trump called Bolsonaro’s prosecution a “witch-hunt”, but he was convicted and handed a 27-year sentence for trying to seize power after losing the 2022 election to Lula.

How Trump is meddling in Brazil’s election – explainerHow Trump is meddling in Brazil’s election – explainer

In recent months, the Trump administration has again been accused of meddling in Brazilian affairs by using tariffs and the designation of two Brazilian organised crime groups as foreign terrorist organisations to boost Flávio Bolsonaro’s campaign and weaken Lula.

Writing on Thursday, Messias said: “Disagreements between governments are inherent to international relations. What cannot be tolerated is for foreign political interests to seek to interfere in the functioning of Brazilian institutions or to influence, directly or indirectly, choices that belong exclusively to the Brazilian people.”

Messias added: “It is the right of each generation of Brazilians to freely decide their destiny, protect their institutions, and hand over to their children a country that does not accept decisions about Brazil being made outside of Brazil. Our democracy belongs to Brazilians. And so it must remain.”

The attorney general’s comments came in response to a report that the Trump administration was pushing to direct more than $175m of the state department’s flagship human rights fund to a slate of awards that includes a $40m grant for an anti-communism fund, support for a group advancing white Afrikaner rights in South Africa and the campaign against Brazil’s supreme court.

A $1m award titled “Countering lawfare and censorship in Brazil” would fund civil society groups opposing what it calls judicial overreach and censorship by Brazil’s supreme court.

Bolsonaro’s far-right movement considers the supreme court – and in particular justice Alexandre de Moraes, who oversaw Jair Bolsonaro’s trial – its greatest foe.

Moraes is widely seen to have played a key role in thwarting Jair Bolsonaro’s authoritarian plot, which culminated in the 8 January 2023 riots in Brasília, despite concerns about the judge overstepping his constitutional authority in his crusade to protect democracy.

During the rightwing riots, hardcore Bolsonaro supporters trashed the presidential palace, congress and supreme court. The court sustained the most severe damage.

Brazil’s presidential palace left in ruins after Bolsonaro’s supporters storm the building – videoBrazil’s presidential palace left in ruins after Bolsonaro’s supporters storm the building – video

Bolsonaro supporters continue to claim their leader’s imprisonment is unjust and that he is the victim of a politically motivated sham driven by a corrupt “judicial dictatorship”.

Their criticism of Moraes and the supreme court has been bolstered by a recent scandal linking several judges, including him, to Daniel Vorcaro, the playboy banker at the centre of Brazil’s biggest banking scandal. Vorcaro has also been linked to the Bolsonaro family.

The banker reportedly gave the family more than £9m, supposedly to produce a biopic about Jair Bolsonaro starring Jim Caviezel, who played Jesus in Mel Gibson’s film The Passion of the Christ. On the eve of Vorcaro’s arrest last November, Flávio Bolsonaro messaged him to say: “Brother, I’ll always be with you.”

Vorcaro is being held in federal police custody in Brasília. His legal team has consistently denied wrongdoing. On Wednesday, his lawyers said he was not involved in “any kind of illicit activity or criminal practice”.