Members of Tesla’s board are scrambling to control a chief executive who some directors think is out of control.

Elon Musk, the electric-car maker’s co-founder and chief executive, stirred up a public storm by announcing on Twitter last week that he wanted to turn Tesla into a private company. In recent days, according to people familiar with the matter, some of his fellow board members delivered a stern message: Stop tweeting.

Musk hasn’t heeded that advice. He has continued to post messages on Twitter, publicly plotting the company’s strategy and in some cases making assertions of dubious accuracy. That has only added to the chaos engulfing the struggling company.

Tesla’s board members are also racing to inoculate themselves from the possible fallout from Musk’s public statements.

While it’s standard for boards to retain lawyers to counsel them on complicated matters, Tesla’s outside directors have hired two law firms to represent them.

The independent directors retained Paul, Weiss, Rifkind, Wharton & Garrison to help deal with a Securities and Exchange Commission inquiry related to the posts, which is at an early stage but which directors expect could intensify into a full-blown investigation, one person said. And three of those directors have separately hired the law firm Latham & Watkins to advise them as they consider any proposal by Musk to take the company private.

Tesla logo

Tesla declined to make Musk available for an interview.

The tumult is the latest blow to Tesla, which has been struggling financially and facing mounting questions from investors about the company’s ability to meet Musk’s ambitious financial targets.

Some members of the board have grown alarmed by what they see as Musk’s erratic behavior, according to three people familiar with some directors’ thinking. Directors were blindsided last week when Musk claimed on Twitter that he had “funding secured” for a possible deal to convert Tesla from a publicly traded company into a private one. Such a transaction would most likely cost well over $10 billion.

Musk said this week that he has been in talks with Saudi Arabia’s main government investment fund about possibly working on a deal to take Tesla private. But there were no indications that Musk has actually nailed down any commitments to bankroll such a transaction, and the SEC last week contacted the company about Musk’s Twitter posts, which drove up the company’s shares and prompted a halt in trading.

Even before the controversy over the going-private transaction, Tesla and its board of directors faced scrutiny because of multiple directors’ close ties to Musk.

One director is Musk’s brother, Kimbal. Others include Antonio Gracias and Steve Jurvetson, who are both directors of SpaceX, Elon Musk’s rocket company. Jurvetson has been on leave from Tesla’s board since late last year, after he resigned from his venture-capital firm amid allegations of misconduct. He has denied those allegations. Tesla said Jurvetson has not participated in the board’s discussions on a possible buyout.

Another board member, Ira Ehrenpreis, is a SpaceX investor. Brad W. Buss had served as chief financial officer of SolarCity, the solar-panel maker run by Musk’s cousin and where Musk previously served as chairman. Tesla acquired SolarCity in 2016.

Until last year, the only director without direct ties to Musk was Robyn Denholm, chief executive of an Australian telecommunications company.

The board’s independence became an issue when Musk announced the acquisition of SolarCity, which was struggling at the time. Some institutional shareholders complained that the deal was not in Tesla’s best interest. Glass Lewis, a shareholder advisory service, called it a “thinly veiled bailout” of one of Musk’s outside investments.

The California State Teachers’ Retirement System and four other large investors subsequently called on Tesla to add outside directors and tighten its corporate governance.

In response, Tesla added two independent directors last year — James R. Murdoch, son of Rupert Murdoch and chief executive of 21st Century Fox, and Linda Johnson Rice, chairman and chief executive of Johnson Publishing. Even that move sparked controversy, however. Some investors objected to Murdoch’s addition because of his involvement in the phone-hacking scandal in which British tabloids run by the Murdoch family were found to have listened to voicemail messages of celebrities, politicians and a murdered teenager.

Board members’ past chumminess with Musk continues to present a problem.

One independent director’s personal relationship was deemed too close for him to sit on a committee the board established to evaluate Musk’s potential going-private transaction, according to two people familiar with the matter. As a result, that key committee only has three members.

Tesla has also been plagued by operational problems and it has struggled to meet Musk’s production targets for the Model 3 sedan, the company’s first mass-market offering and a vehicle he has said is crucial to company’s ability to become profitable.

“The issues facing Tesla relate to a lack of operational maturity,” said Roger McNamee, a Silver Lake founder who is now a managing director of the private-equity firm Elevation Partners. “The market has been remarkably patient as Tesla struggles to scale its manufacturing.”

That patience has been tested by Musk in recent months. He has publicly disparaged financial analysts and insulted a cave diver who was helping rescue members of a Thai soccer team.

Board members’ frustrations have intensified in recent days.

Directors were upset that Musk’s tweets forced them to rush out a public statement explaining a transaction that was at an embryonic stage, according to people familiar with the thinking of board members.

Multiple directors have recently told Musk that he should stop using Twitter, with one urging him to stick to building cars and launching rockets, according to people familiar with the board’s communications. Tesla employees, including the company’s public-relations staff, have echoed that point, another person said.

Late Monday, Musk was back on Twitter. He posted a message that he is “excited to work with Silver Lake and Goldman Sachs” as financial advisers on his proposal to privatize Tesla.

But neither Goldman nor Silver Lake — a private-equity firm focused on technology investments — had actually signed on with Tesla or Musk to play those roles, according to people familiar with the matter.

On Tuesday, Goldman was in talks with Tesla about a possible role, but had not finalized anything. Silver Lake, meanwhile, is interested in investing in any going-private deal, but it isn’t acting in a paid advisory capacity.