Brazil's Supreme Court has ordered a nationwide blocking of the Telegram messenger service for violations of judicial decisions, antagonizing President Jair Bolsonaro.

The decision was based on a request from the federal police, the court said on Friday (local time) on Twitter.

The background is investigations into a blogger who is close to Bolsonaro.

Ahead of the presidential election in October, the head of state, his sons, ministers and advisers are increasingly using Telegram to get their political messages out to the people.

Bolsonaro wants to secure another term in the election.

A Telegram ban would make it difficult for the populist to communicate with his followers.

Bolsonaro described the judge's decision at an event in the city of Rio Branco as "unacceptable".

"Because he couldn't reach two or three people who he thinks should be banned from Telegram, he's targeting 70 million people," Bolsonaro said.