The country’s Supreme Court gave the service 24 hours to name a legal representative in Brazil or face suspension.

Brazil’s Supreme Court on Wednesday gave Elon Musk 24 hours to name a legal representative for X in Brazil or face a ban of his social network across the nation of 200 million.

Mr. Musk closed X’s office in Brazil last week in protest of orders from a Brazilian Supreme Court justice to suspend certain accounts. If X refuses to comply, it could lose access to one of its largest markets outside the United States — a blow as the company struggles to regain revenue after Mr. Musk battled with advertisers and told them not to spend on the platform.

The court posted its order on X on Wednesday night, suggesting that Mr. Musk had until about 8 p.m. local time Thursday to respond.

The moment is one of the biggest tests yet for Mr. Musk’s efforts to mold X to his personal ideology, and how he responds will shed light on how far he is willing to take his stated commitment to protecting his social network from what he calls censorship.

X and Mr. Musk did not immediately respond to requests for comment on the possible ban.

Mr. Musk has been enmeshed in a monthslong feud with Alexandre de Moraes, a Brazilian Supreme Court justice whom he has accused of censoring conservative voices online. Justice Moraes has ordered the suspension of more than 100 X accounts in what he says is a battle against misinformation, hate speech and attacks on democracy.

Most of the accounts that Justice Moraes has targeted belong to right-wing supporters of Jair Bolsonaro, Brazil’s former president. Some of them questioned Mr. Bolsonaro’s 2022 election loss and sympathized with protesters who raided Brazil’s halls of power, hoping to invoke a military takeover.

We are having trouble retrieving the article content.

Please enable JavaScript in your browser settings.


Thank you for your patience while we verify access. If you are in Reader mode please exit and log into your Times account, or subscribe for all of The Times.


Thank you for your patience while we verify access.

Already a subscriber? Log in.

Want all of The Times? Subscribe.