Tesla chief Elon Musk and the electric car company have agreed to pay a total of 40 million dollars (£30 million) and make a series of concessions to settle a government lawsuit alleging he duped investors with misleading statements about a proposed buyout of the company.

The Securities and Exchange Commission announced the settlement on Saturday, two days after filing a case seeking to oust Mr Musk as chief executive.

The settlement will require him to relinquish his role as chairman for at least three years, but he will able to remain as chief executive.

Tesla must hire an independent chairman to oversee the company.

Mr Musk, a billionaire, and Tesla, a company that ended June with 2.2 billion dollars (£1.7 billion) in cash, are each paying 20 million dollars (£15 million) to resolve the case.

The deal could remove one cloud that hangs over Tesla. Investors fretted about the company’s ability to cope without Mr Musk, a charismatic entrepreneur whose penchant for coming up with revolutionary ideas has drawn comparisons to one of Silicon Valley’s most revered visionaries, Apple co-founder Steve Jobs.

Tesla’s stock plummeted 14% on Friday after the SEC filed its lawsuit, erasing more than 7 billion dollars in shareholder wealth. Many analysts predicted the shares would fall further if Mr Musk was forced to step down.

The steep downturn in Tesla’s market value may have influenced him to have an apparent change of heart and negotiate a settlement. He had rejected a similar settlement offer before the SEC sued on Thursday, maintaining he had done nothing wrong when he posted an August 7 tweet declaring he had secured the financing to lead a buyout of Tesla.

The SEC alleged Mr Musk was not close to locking up the estimated 25 billion to 50 billion dollars (£19 billion to £38 billion) needed to pull off the buyout.

Mr Musk and Tesla reached their settlement without admitting to or denying the SEC’s allegations.