THE brief and bizarre battle between Elon Musk, the face of Tesla, and the Securities and Exchange Commission (SEC), the main regulator of America’s stockmarkets, is over. The agency had filed a civil lawsuit against Mr Musk on September 27th, alleging that he misled shareholders about his plan to take the firm private. The Tesla boss had casually tweeted on August 7th: “Am considering taking Tesla private at $420. Funding secured.”

The resulting surge in Tesla’s share price, and Mr Musk’s oft-stated desire to “burn” the short sellers that have targeted his firm, stoked the SEC’s anger. Its investigation revealed that Mr Musk had indeed reached an oral agreement with a Middle Eastern investor, believed to be Saudi Arabia’s sovereign-wealth fund, to take the firm private but had not agreed on a specific price or got bankers involved to draft the paperwork. Unimpressed, regulators asked the courts to ban the entrepreneur from serving as a director or senior officer at any public company, including Tesla.

The prospect of the visionary boss of the world’s leading electric-vehicle (EV) manufacturer being ousted from the firm he has lifted from obscurity to global prominence shocked investors, who started dumping its shares. In the event, however, it turned out that the SEC was using this extreme threat to get a reluctant Mr Musk to accept sensible reforms of corporate governance at Tesla, which by all accounts he has run with an iron fist. Under a settlement that was announced on October 1st, he cannot serve as chairman of the EV maker for three years; Tesla must also appoint two independent board directors. The firm has also agreed to supervise Mr Musk’s corporate communications, including his tweets. Tesla shares jumped once more on the news that Mr Musk will remain as chief executive. Although America’s Department of Justice has started a criminal probe of the “funding secured” tweet, this would require proving criminal intent, a high bar. Some disgruntled investors have launched lawsuits, but these are nuisances compared with the threat of regulatory action. The hope for shareholders is that a chairman overseeing Mr Musk, along with a more independent board, will keep him focused on the job at hand. That job is considerable. Production numbers released on October 2nd contained encouragement for a firm that has struggled to ramp up output of its Model 3, its first mass-market EV. But Tesla still has big distribution problems to iron out. Some worry that Mr Musk’s skills are not necessarily those required to run a manufacturing business. He is a brilliant product developer; as a result, Tesla now has an array of vehicles in various stages of planning, including a lorry, a roadster, a small SUV and possibly a cheaper mass-market car. His ability to convince investors to hand over cash is impressive. But the idea of appointing a new chief operating officer to oversee the nuts and bolts of the business has long hung in the air.

The whirring exit door for Tesla executives shows the difficulty of finding someone ready to work under a self-described “nano-manager”. Still, it is possible. The day-to-day running of SpaceX, his thriving rocket business, is handled by Gwynne Shotwell, a talented aerospace veteran, with Mr Musk taking more of a hands-off role. By insisting that Mr Musk ease his white-knuckle grip on Tesla’s wheel, the SEC may have done the carmaker and its backers a favour.