Elon Musk, Tesla’s chief executive, under pressure from his lawyers and investors, reached a deal with the Securities and Exchange Commission on Saturday to resolve a securities fraud case. The settlement will force Mr. Musk to step aside as chairman for three years and pay a $20 million fine.
The S.E.C. announced the deal two days after it sued Mr. Musk in federal court for fraud and misleading investors over his post on Twitter last month that he had “funding secured” for a buyout of the electric-car company at $420 a share.
The deal with the S.E.C. will allow him to remain as chief executive, something he could have jeopardized if he had gone to battle with the agency.
It is not clear why Mr. Musk changed his mind so quickly. But people familiar with the situation said lawyers for Mr. Musk and the company moved to reopen the talks with the S.E.C. on Friday.
The whipsaw events of the past few days followed a series of self-inflicted wounds caused by Mr. Musk and his tweet about taking his company private. The events of the last two months have raised concerns about Mr. Musk’s ability to guide Tesla as it has struggled to meet production goals for its Model 3 car. The tweet, along with attacks on critics on social media, have also raised concerns among investors about whether he has become too focused on criticism from the bearish investors known as short-sellers.
The company has not yet officially commented on the settlement.
Shares of Tesla have been hit hard since the S.E.C. filed the lawsuit. On Friday, the stock dropped almost 14 percent.
The terms of the new settlement are slightly tougher than those that two people briefed on the talks said Mr. Musk had rejected on Thursday, which called for a two-year bar on serving as chairman and a $10 million fine.
Tesla, which is also settling, will pay a $20 million penalty. The company was not charged with any fraud.
The company will add two independent directors and take steps to monitor Mr. Musk’s communications with investors. It will also create a permanent committee of independent directors to monitor disclosures and potential conflicts of interest.
Jay Clayton, the S.E.C. chairman, said the settlement with Mr. Musk and Tesla sent a message that “when companies and corporate insiders make statements, they must act responsibly, including endeavoring to ensure the statements are not false or misleading.”
In settling, Mr. Musk neither admitted nor denied misleading investors under the civil fraud charge, which means he cannot later say he did nothing wrong.
The settlement with the S.E.C. faulted Tesla for failing to make sure that information important to investors was disclosed in a proper and timely manner.
Mr. Musk had a good reason to reopen the settlement talks because the S.E.C., in suing him, had sought to bar him permanently from serving as a top executive or officer of Tesla or any other public company. Under the deal reached on Saturday, he will not only remain as chief executive, but will also stay on as a board member, just not as chairman.
“The total package of remedies and relief announced today are specifically designed to address the misconduct at issue by strengthening Tesla’s corporate governance and oversight in order to protect investors,” said Stephanie Avakian, co-director of the S.E.C.’s enforcement division.
Mr. Musk, according to people familiar with the negotiations, had been concerned whether settling a civil fraud charge might affect the ability of Tesla and the other companies he runs, including SpaceX and the Boring Company, to raise money from investors in private placements and the debt markets.
But a Tesla spokesman said the S.E.C. had granted waivers to all of those companies so his settlement would not be held against them.
Waivers in such a situation are not uncommon, legal experts have said.
A Tesla spokesman said that Mr. Musk, a billionaire, would be buying $20 million in Tesla stock. The amount of stock being bought by Mr. Musk matches the penalty the company has to pay under the settlement, which was filed in federal court in Manhattan.
The S.E.C. reacted quickly after the Aug. 7 tweet, which caused an immediate surge in Tesla shares. Regulators served a subpoena on the company seeking information and moved to take testimony from Mr. Musk and others at the company, people familiar with the matter said.
Negotiations toward an initial settlement began about a week ago, after the S.E.C. said it was planning to send an official notice to Mr. Musk and Tesla that it was considering filing an enforcement action, those briefed on the talks said. By their account, all the parties thought a deal had been reached by Wednesday evening, and the plan was for a settlement with Mr. Musk and Tesla to be announced on Thursday.
Mr. Musk was said to have backed away from a settlement, in part, because he was concerned that he couldn’t later tell investors that he had not done nothing wrong. But the settlement on Saturday requires him to do that.
In a so-called “admit nor deny” settlement, a settling party cannot later disavow the terms of the settlement.
After Mr. Musk said rejected the deal on Thursday, his lawyers had asked the S.E.C. to wait a couple of days so they could talk him into it, but the regulators said no, said another person familiar with the matter but not authorized to speak publicly.
Once the S.E.C. sued Mr. Musk, his lawyers continued to talk to him about moving forward with a settlement and eventually he agreed, this person said.
In the meantime, Mr. Musk had conversations with investors and Mark Cuban, an entrepreneur who has had his own battles with the S.E.C., and they gave him a sense of how difficult it is to fight one of these suits, even if he eventually won, said another person familiar with the negotiations.
The parties worked much of Friday and Saturday to get a deal done.
The settlement clears a big headache for Tesla, but other problems remain.
The S.E.C. is continuing to look into the company’s past claims about its production goals. And now with Mr. Musk agreeing to step down as chairman, Tesla’s board must decide who should replace him.
Emily Flitter, David Gelles and Andrew Ross Sorkin contributed reporting.