Tesla Inc (TSLA.O) Chief Executive Officer Elon Musk sold $6.9 billion worth of shares hoping that funds could be used to finance a potential Twitter deal if he loses a legal battle with the social media platform.

“In the (hopefully unlikely) event that Twitter forces this deal to close and some equity partners don’t come through, it is important to avoid an emergency sale of Tesla stock,” he said in a tweet.

Musk took to Twitter and said “yes” when asked if he was done selling Tesla stock, adding he would buy it again if the Twitter deal does not close.

legal experts have suggested that if Musk is forced to complete the acquisition or settle the dispute with a stiff penalty, he was likely to sell more Tesla shares.

Musk sold about 7.92 million shares between Aug.5 and Aug.9, and now owns just under 15% of the automaker, according to Reuters calculations. The latest sales bring total Tesla stock sales by Musk to about $32 billion in less than one year.

Meanwhile, Musk in early July tore up his April 25 agreement to buy Twitter for $44 billion. Twitter has sued Musk to force him to complete the transaction, dismissing his claim that he was misled about the number of spam accounts on the social media platform as buyer’s remorse in the wake of a plunge in technology stocks.