A Supreme Court judge in Brazil ordered the suspension of messaging app Telegram, in a ruling published Friday on the court's website.
Judge Alexandre de Moraes said the company had repeatedly refused to comply with rulings and requests from police and the justice system to help fight disinformation in the run-up to the elections.
"Telegram's disrespect for Brazilian law and repeated failure to comply with countless court decisions... is completely incompatible with the rule of law," wrote Moraes.
He gave Brazil's telecoms regulator 24 hours to suspend Telegram's operations nationwide.
The ruling came from a case over an earlier court order, where Telegram ignored to block the account of pro-Bolsonaro blogger Allan dos Santos.
Moraes said the messaging app had also refused to comply with several other orders, including cases of child sexual abuse imagery.
The ruling is a major blow to far-right President Jair Bolsonaro who is seeking reelection in October and has more than a million followers on Telegram, alongside numerous fan groups.
Bolsonaro: Brazilians freedom 'at risk'
Bolsonaro slammed the ruling as "inadmissible" and said it put the "freedom" of Brazilians at risk.
Moraes had "failed to act against the two or three people that according to him should be blocked, so he decided to affect 70 million people," Bolsonaro said.
The populist president is facing a popularity slump over his response to the COVID-19 pandemic and has pursued Telegram as wa way to help rally his base.
Often dubbed Brazil's Trump, Bolsonaro has often courted controversy and was criticized for downplaying the COVID-19 pandemic just as case numbers soared.
He's previously accused two Supreme Court judges, including Moraes, of a having a vendetta against him.
Bolsonaro has had various posts blocked on Facebook, Twitter and YouTube for violating rules on misinformation.
He currently trails leftist ex-president Luiz Inacio Lula da Silva, his likely opponent, in the polls.
Telegram calls ruling a 'miscommunication'
Telegram founder and CEO Pavel Durov apologized for the company's "negligence" over the disinformation allegations.
In an Instagram post, he blamed a "miscommunication" problem.
Durov asked the court to delay its ruling for a few days as it sought to improve compliance.
The court ruling, however, said Telegram's behavior had underlined its "total contempt for the Brazilian justice system."
Court chief Luis Roberto Barroso wrote to Telegram in December requesting a meeting and warning that the app was rife with "conspiracy theories and false information about (Brazil's) electoral system."
The platform was notably absent last month when Brazilian authorities signed an agreement to combat disinformation during the elections with Twitter, TikTok, Facebook, WhatsApp, Instagram and YouTube.
Telegram enjoys popularity in Brazil
Founded by Russian-born tech entrepreneur Pavel Durov in 2013, Dubai-based Telegram is hugely successful in Brazil.
The app has been downloaded on 53% of all cell phones.
Telegram has made its refusal to cooperate with the authorities part of its brand.
The app has proved popular with far-right groups worldwide.
In Germany, the app has been blamed for fueling an increasingly virulent subculture of anti-vaccine conspiracy theorists who arrange protests that have spilled over into violence.