Twitter has agreed to comply with tough new EU laws on fake news, Russian propaganda and online crime after a team of officials from the European Commission entered its headquarters to stress test its capacity to operate legally in Europe.
The move came just weeks after Elon Musk, Twitter's owner, quit the bloc's voluntary code of practice on disinformation.
In the first exercise of its kind, EU officials were allowed into the company's headquarters on Thursday to carry out a mock exercise with Twitter staff to test its controls on Russian propaganda, fake news and criminal activity including child sexual exploitation.
Related: Digital Services Act: inside the EU's ambitious bid to clean up social media
Thierry Breton, the commissioner responsible for enforcement of the new Digital Services Act, welcomed the fact the company voluntarily agreed to the test.
He reiterated his warning to all social media companies that the EU would act swiftly and sharply to uphold the sweeping new laws that enter into force in August.
"When it comes to online crime, there can be no half measures. Very large online platforms need to put the necessary internal controls and resources in place to be ready for the new European rules," he said.
The new laws come into force on 25 August but EU fears that Twitter may not comply had become heightened, with one commissioner warning the company recently that a "wild west" operation would not be tolerated.
The checks in the exercise covered areas including recommended content and controls to fight illegal content online such as online child sexual exploitation, as well as Twitter's approach to disinformation.
Forty-four companies, including Google and Facebook, are participating in the EU's code of practice, which the bloc introduced as a means of helping social media platforms prepare for the new laws.
The EU had warned Musk he could face a complete ban in Europe or fines running up to 6% of its global revenue if it does not comply with the laws.
Breton, on a two-day visit to Silicon Valley, said Twitter still had a long way to go to get ready. "Twitter is taking the exercise seriously and has identified the key areas on which it needs to focus to comply with the DSA. With two months to go before the new EU regulation kicks in, work needs to continue for the systems to be in place and work effectively and quickly.
"I told Elon Musk and Linda Yaccarino [Twitter's chief executive] that Twitter should be very diligent in preparing to tackle illegal content in the European Union.
"Fighting disinformation, including pro-Russian propaganda, will also be a focus area in particular as we are entering a period of elections in Europe."