Tesla shares surged 17 percent Monday after CEO Elon Musk settled charges with the Securities and Exchange Commission.

The SEC charged Musk with fraud Thursday alleging he issued "false and misleading" statements and failed to properly notify regulators of material company events. The charges were in relation to a tweet that Musk posted in August saying he was considering taking the electric carmaker public at $420 a share.

On Saturday, Musk settled the charges with the SEC, agreeing to pay a civil penalty of $20 million and give up his role as chairman of the board for at least three years. The SEC also imposed a fine of $20 million on Tesla. The carmaker must also appoint two independent directors to the board.

Under the deal's terms, Musk and Tesla neither admit or deny wrongdoing alleged by regulators.

Tesla's gains Monday — its best day on Wall Street since May 2013 — morning erase the stock's 14 percent plunge on Friday.

Investors will now be focusing on Tesla's next earnings report. Over the weekend Musk sent an email to staff saying that Tesla was "very close' to being profitable. In two emails obtained by CNBC, Musk told staff to "ignore the distractions" and that the company was close to "proving naysayers wrong."

Correction: The SEC charged Elon Musk with fraud. An earlier version of this story incorrectly said Tesla had been charged.