Tesla and the Securities and Exchange Commission were close to a no-guilt settlement but Elon Musk pulled out at the last minute, sources told CNBC. Under the deal, Musk and Tesla would have had to pay a nominal fine, and the CEO would not have had to admit any guilt, the sources said. However, the settlement would have barred Musk as chairman for two years and would require Tesla to appoint two new independent directors, CNBC's David Faber, citing sources. Musk refused to sign the deal because he felt that by settling he would not be truthful to himself, and he wouldn't have been able to live with the idea that he agreed to accept a settlement and any blemish associated with that, the sources said.

Tesla did not immediately reply to CNBC's request for comment about the collapse of the deal at the last minute, which was disclosed to Andrew Ross Sorkin by sources who spoke on condition of anonymity. Musk said Thursday the SEC's allegations are "unjustified" and that he acted in the best interests of investors. "Tesla and the board of directors are fully confident in Elon, his integrity, and his leadership of the company, which has resulted in the most successful U.S. auto company in over a century. Our focus remains on the continued ramp of Model 3 production and delivering for our customers, shareholders and employees," said Tesla's board of directors in a statement. The SEC sued Tesla on Thursday, alleging fraud over Musk's tweet on Aug. 7 in which he announced he was planning to take the company private and had secured funding for the deal. It would have been the largest such transaction of its kind. Musk later said in a blog post he had been approached by the Saudi Arabian sovereign wealth fund multiple times about investing in Tesla, making him confident he would be able to secure the funds needed to take the company private at his price of $420 per share. Musk called off his plans to take Tesla private on Aug. 24. The Wall Street Journal was first to report news of the proposed settlement Musk turned down.