WASHINGTON - Social media platform X, formerly Twitter, will shutter its local operations in Brazil following a bitter legal tussle over the platform’s rights and responsibilities, owner Elon Musk said on Sunday. The service will remain available to Brazilian users. The closure was the apparent culmination of an ongoing legal battle between Musk and Brazilian Supreme Court Judge Alexandre de Moraes, who has said he is trying to fight the spread of dangerous disinformation online.

A post Saturday from X’s Global Government Affairs department said Moraes had “threatened our legal representative in Brazil with arrest if we do not comply with his censorship orders.” It said the office closure was necessary “to protect the safety of our staff,” adding, “the responsibility lies solely with Alexandre de Moraes.” The Brazilian government was critical of X’s stance, with Secretary of Digital Policies Joao Brant writing on the platform that the company had a “pathetic attitude.

” He added that X would force a “probable escalation that could lead to blocking of the platform.” Moraes previously had ordered the suspension of several Twitter accounts suspected of spreading disinformation, including those of supporters of former far-right president Jair Bolsonaro, who tried to discredit the voting system in the 2022 presidential election, which he lost. “Freedom of expression doesn’t mean freedom of aggression,” Moraes has said.

“It doesn’t mean the freedo.