(CNN Money) — Elon Musk agreed Saturday to step down as chairman of Tesla and pay a $20 million fine in a deal to settle charges brought this week by the Securities and Exchange Commission.

Under the settlement, which requires court approval, Musk will be allowed to say as CEO but must leave his role as chairman of the board within 45 days. He cannot seek reelection for three years, according to court filings.

He accepted the deal with the SEC “without admitting or denying the allegations of the complaint,” according to a court document.

Musk joined Chicago Mayor Rahm Emanuel earlier this year announcing plans to develop an underground, high-speed rail system to take commuters from the downtown area to O’Hare International Airport in less than 15 minutes.

The SEC alleged on Thursday that Musk misled investors when he tweeted on August 7 that he had secured funding to take Tesla private at $420 a share, causing Tesla’s stock to soar. He had not secured the funding, the SEC said.

Separately, Tesla agreed Saturday to pay $20 million to settle claims it failed to adequately police Musk’s tweet.

Tesla did not immediately reply to CNN’s request for comment.

© 2018 Cable News Network, Inc., a Time Warner Company. All rights reserved.