A tweet that resulted in a $40 million settlement with the federal government was "worth it," founder Elon Musk wrote in a post on Friday before announcing he was taking a short break from Twitter.

Earlier this year, Musk tweeted that he secured funding to take Tesla private at $420 a share, a substantial premium over the company's stock value at the time. The Securities and Exchange Commission later alleged in a civil suit that Musk knowingly made the claim without any evidence to support it.

As part of a settlement with the agency, the 47-year-old entrepreneur and Tesla are required to pay separate $20 million fines. Musk must also relinquish his role as chairman of the company's board and Tesla is required to put additional safeguards around Musk's online communications.

Musk has taunted the agency on Twitter before, once referring to it as the "Shortseller Enrichment Commission." His latest jab comes after a federal judge approved the settlement between the federal government and Tesla.

Musk on Friday also referred to a reported investigation by the Justice Department over whether Tesla inflated its production numbers as "total BS."

After several posts, Musk said he was "signing off Twitter for a few days."

[Related: Cutting prices for Tesla's Model 3 may undermine profitability push]