X, formerly known as Twitter, has said it expects to be blocked in Brazil after failing to meet a deadline to name a new legal representative for the company.
The social media network closed its office in the country earlier this month, saying its representative had been threatened with arrest if she did not comply with orders it described as "censorship".
The months-long row began with Supreme Court Judge Alexandre de Moraes in April ordering the suspension of dozens of X accounts for allegedly spreading disinformation.
X owner Elon Musk has threatened to reactivate the accounts, and has described Justice Moraes as a "tyrant" and a "dictator".
Justice Moraes gave X 24 hours to name a new legal representative or face suspension, with the deadline coming just after 20:00 local time (23:00 GMT) on Thursday.
A ban would be expected to take some 12 hours to come into force.
But in a post from one of its official accounts shortly after the deadline expired, X made clear that it had not complied with the order.
"Soon, we expect Judge Alexandre de Moraes will order X to be shut down in Brazil – simply because we would not comply with his illegal orders to censor his political opponents," the post said.
"The fundamental issue at stake here is that Judge de Moraes demands we break Brazil’s own laws. We simply won’t do that."
X said it would not comply "in secret with illegal orders", adding that it would publish the judge's demands in the coming days "in the interests of transparency".
Justice Moraes had ordered that X accounts accused of spreading disinformation - many supporters of the former right-wing president Jair Bolsonaro - must be blocked while they are under investigation. He said the company's legal representatives would be held liable if any accounts were reactivated.
Meanwhile, the bank accounts of Mr Musk's satellite internet firm Starlink have been frozen in Brazil following an order by the country's Supreme Court.
Starlink responded with a post on X which said the "order is based on an unfounded determination that Starlink should be responsible for the fines levied - unconstitutionally - against X."
Mr Musk also said on X that "SpaceX and X are two completely different companies with different shareholders."
Starlink is a subsidiary of Mr Musk's rocket firm SpaceX.
Justice Moraes gained prominence after his decisions to restrict social media platforms in the country.
He is also investigating Mr Bolsonaro and his supporters for their roles in an alleged attempted coup on 8 January last year.