Brazil's Supreme Court has said it is lifting a ban on the social media platform X, formerly known as Twitter. In his decision, Justice Alexandre de Moraes said that he authorised the "immediate return" of X's activities in the country after it paid hefty fines and blocked accounts accused of spreading misinformation. According to a statement, the site has paid fines totaling 28 million reais ($5.1m; £3.8m) and agreed to appoint a local representative, as required by Brazilian law. Moraes had blocked access to the platform, owned by Elon Musk, after it had refused to ban several profiles deemed by the government to be spreading misinformation about the 2022 Brazilian Presidential election. Anatel, Brazil's telecoms watchdog, has been instructed to ensure service has resumed for more than 20 million users in the country within 24 hours. After months of defying the court's orders, Musk fired the company's Brazilian staff in late August and closed X's office in Brazil. "The decision to close X offices in Brazil was difficult," Musk, who also runs electric carmaker Tesla and rocket company SpaceX, wrote at the time. A self-declared "free-speech absolutist", the billionaire entrepreneur had described Justice Moraes' move to ban several dozen accounts as an abuse of power and a violation of free speech. Several days later, Justice Moraes ordered for the entire platform to be blocked across the country. Many users switched to alternative sites such as Bluesky, and demand for VPNs (Virtual Proxy Networks) in Brazil soared. But in September, the platform began to comply with the court's orders in an apparent U-turn. On Tuesday, X said that it was "proud to return to Brazil". "Giving tens of millions of Brazilians access to our indispensable platform was paramount throughout this entire process," its government affairs team wrote in a statement. It appears that X has now complied with all of the judge's demands in order to have the ban lifted. Brazil is one of the biggest markets for the platform across the globe, as well as its largest in Latin America, with an estimated 22 million users. — BBC