Shares of Tesla dropped sharply in after-hours trading Thursday after court documents showed the Securities and Exchange Commission is suing Elon Musk for fraud.

Sources close to the company told CNBC the company was also expecting to be sued, though Tesla was not named as a defendant in the complaint.

Tesla's stock dropped as much as 13 percent, to around $268, down from $307.52 as of the close.

Musk, the company's CEO, tweeted last month he was thinking about taking Tesla private, noting: "Funding secured."

Tweet

The Aug. 7 tweet sent Tesla shares flying, and they closed 11 percent higher on the day.

After sending the tweet, Musk claimed he had been in talks with the Saudi Arabian sovereign wealth fund and was confident he'd have the funding to take the company private at $420 a share. Tesla abandoned its plans to go private later in August.

"The SEC is looking at it very seriously. The stock is going to be under pressure while this gets resolved, and obviously these things take time. The SEC obviously has fired the first shot," said Art Hogan, chief market strategist at B. Riley FBR. "It sounds like the company's first communication was to defend."

Tesla since Aug. 7

Source: FactSet

In its complaint, the SEC said Musk knew he "had not agreed upon any terms for a going-private transaction with the Fund or any other funding source," adding Musk had "had no further substantive communications with representatives of the Fund beyond their 30 to 45 minute meeting on July 31."

Regardless, the stock has been a roller-coaster ride for investors ever since the infamous Aug. 7 tweet. Since popping that day, the stock has dropped 19 percent through Thursday's close.

Colin Rusch, an analyst at Oppenheimer with a buy rating and a $385 price target on Tesla, told CNBC's "Closing Bell" the stock, and the company, can recover from this.

"The potential for this platform is generating an awful lot of cash flow," Rusch said. If "they implement some fiscal discipline around growth and increment operating margins, we do think there is still an awful lot of capital that is still very bullish on this name and will continue to buy the name even with this sort of overhang."

— CNBC's Patti Domm contributed to this report.

WATCH: Munster thinks there's a 25% chance Musk remains Tesla CEO