Supreme Court Justice Alexandre de Moraes - who has been locked in a months-long feud with Musk - on Tuesday gave X the green light to resume operations in Latin America's largest country, effective immediately.
In the decision, Moraes said, "all the necessary requirements for the immediate return of X Brazil... were documented."
X had been suspended in Brazil, one of its largest and most-coveted markets, since late August after not complying with court orders related to hate speech moderation and failing to name a legal representative in the country, as required by law.
Musk, who had denounced the orders as censorship and called Moraes a "dictator," backed down and started to reverse his position in recent weeks, with X blocking ordered accounts, tapping a local representative and paying pending fines.
Moraes, in his Tuesday decision, ruled that Brazil's telecommunications regulator Anatel must work to allow X to come back online in the country within 24 hours.
Earlier on Tuesday, Brazil's top prosecutor's office had given its legal opinion to the court, backing the reinstating, the final measure needed before Moraes could allow X, formerly Twitter, to resume services in the country.Â