Brazilian President Luiz Inacio Lula da Silva has said his country "won't accept interference or instruction from anyone" after US President Donald Trump defended former Brazilian leader Jair Bolsonaro.
"The defence of Brazil's democracy is a matter for Brazilians. We are a sovereign country ... We have solid, independent institutions," Lula said in a statement on Monday, without naming Trump.
The US president earlier in the day said that Bolsonaro, who is on trial on charges of plotting a coup to stop Lula from taking office in January 2023, was the victim of a witch hunt.
"LEAVE BOLSONARO ALONE!" Trump wrote on social media.
Bolsonaro is facing trial before Brazil's Supreme Court for allegedly leading a "criminal organisation" that plotted a coup to keep him in power after his 2022 election defeat to leftist Luiz Inacio Lula da Silva.
"I have watched, as has the World, as they have done nothing but come after him, day after day, night after night, month after month, year after year!" Trump said in a social media post.
According to prosecutors, the alleged coup plot failed to materialise due to a lack of support from the military high command.
Bolsonaro faces a possible sentence of up to 40 years in prison.
He claims to be the victim of political persecution to prevent him from running for president next year, despite being barred from running until 2030 for spreading misinformation about the electoral system.

The case carries echoes of Trump's own prosecution over the January 6, 2021 riots, when Trump supporters overran the US Congress to try to reverse his election loss.
Trump pleaded not guilty and the case was abandoned when he was reelected president.
Bolsonaro's son Eduardo praised Trump's post and said it "would not be the only news coming from the United States in the near future".
Trump's comments also came as Lula hosted representatives from China, Russia, Iran and other nations for a BRICS summit in Rio de Janeiro.
Leaders attending the summit criticised Trump's tariffs and his bombing of Iran, drawing the US president's ire and a threat of 10 percent additional tariffs on each BRICS-aligned country.