X, formerly known as Twitter, has closed its office in Brazil over a censorship row.
The social media platform said a Brazilian Supreme Court judge, Alexandre de Moraes, threatened its legal representative in Brazil with arrest if it did not comply with his "censorship orders".
Brazil's Supreme Court has not commented.
People in Brazil are still able to use X, billionaire Elon Musk's platform said on Saturday.
Mr Moraes had ordered X accounts he has accused of spreading disinformation - many supporters of the former right-wing president Jair Bolsanaro - must be blocked while they are under investigation.
After X owner Musk criticised Mr Moraes, the judge ordered 100,000 reais ($19,774; £15,670) fines a day for any account that X reactivated and stressed the possible liability of the company's legal representatives in Brazil if this were to happen.
He also put Mr Musk under investigation for charges including the obstruction of justice.
X said in a statement that Brazilian staff had no responsibility or control over whether content is blocked but Mr Moraes has chosen to threaten staff in Brazil rather than respect the law.
"As a result, to protect the safety of our staff, we have made the decision to close our operation in Brazil, effective immediately," X said.
"The responsibility lies solely with Alexandre de Moraes.
"His actions are incompatible with democratic government."
Musk posted on X that there was "no question that Moraes needs to leave".
He added that the decision to close the office in Brazil was "difficult", but if the company agreed to Mr Moraes' "demands, there was no way we could explain our actions without being ashamed".
Mr Moraes is disliked by fans of the former president Mr Bolsonaro. During his presidency, he ordered investigations into some of the president’s allies.
Latest Stories
-
I want to focus more on my education – Chidimma Adetshina quits pageantry
2 hours -
Priest replaced after Sabrina Carpenter shoots music video in his church
2 hours -
Duct-taped banana artwork sells for $6.2m in NYC
2 hours -
Arrest warrants issued for Netanyahu, Gallant and Hamas commander over alleged war crimes
2 hours -
Actors Jonathan Majors and Meagan Good are engaged
2 hours -
Expired rice saga: A ‘best before date’ can be extended – Food and Agriculture Engineer
2 hours -
Why I rejected Range Rover gift from a man – Tiwa Savage
2 hours -
KNUST Engineering College honours Telecel Ghana CEO at Alumni Excellence Awards
3 hours -
Postecoglou backs Bentancur appeal after ‘mistake’
3 hours -
#Manifesto debate: NDC to enact and pass National Climate Law – Prof Klutse
3 hours -
‘Everything a manager could wish for’ – Guardiola signs new deal
3 hours -
TEWU suspends strike after NLC directive, urges swift resolution of grievances
4 hours -
Netflix debuts Grain Media’s explosive film
4 hours -
‘Expired’ rice scandal: FDA is complicit; top officials must be fired – Ablakwa
5 hours -
#TheManifestoDebate: We’ll provide potable water, expand water distribution network – NDC
5 hours