Elon Musk and the US Securities and Exchange Commission (SEC) reached an agreement on Friday over the Tesla boss’ use of Twitter, according to a court filing.

The stock market regulator in February demanded that Musk be held in contempt for a series of tweets it says violated an agreement not to make misleading claims about his company.

The compromise agreement foresees that Musk may not unilaterally disseminate any more information that could affect Tesla shares, including information on finances, production goals, takeovers and mergers.

Any such communications from Musk would first need to be approved by a lawyer with the relevant expertise.

The deal still needs to be approved by Judge Alison Nathan.