Signs of turmoil at Tesla multiplied Monday after the electric car company told employees it would lay off more than 10% of the workforce to cut costs and two senior executives resigned.

The job cuts, amounting to about 14,000 people, come as the company faces increasing competition and declining sales. The management changes and layoffs are a reminder of the unpredictability of CEO Elon Musk at a critical time for the company.

Musk has not outlined a plan to reverse a decline in car sales, and he appears focused on long-shot ventures such as a self-driving taxi, rather than new models that would help Tesla compete with cars being introduced by established carmakers and new rivals from China.

“As we prepare the company for the next phase of growth, it is extremely important to look at every aspect of the company for cost reductions and increasing productivity,” Musk told employees in a Monday morning email, a copy of which was reviewed by The New York Times.

“There is nothing I hate more, but it must be done,” he wrote.

Hours after that email, Drew Baglino, a senior vice president who has played a big role in the company’s rise from startup to dominant electric carmaker, said he had resigned.

“I made the difficult decision to move on from Tesla after 18 years yesterday,” Baglino said in a post on the social platform X. Baglino is one of only three managers besides Musk listed as a top executive on the company’s website. His longevity was unusual at a company known for high management turnover.

Baglino may have been blamed for some of Tesla’s recent troubles, said Gary Black, managing partner of the Future Fund, an investment firm. “Someone has to take the fall for the sharp deceleration in deliveries growth, near record inventories, and declining margins and it wasn’t going to be Elon,” Black said on X.

Tesla also appeared to be losing an executive key to winning regulatory approval for self-driving technology. Rohan Patel, a former aide to President Barack Obama who was Tesla’s head of policy and business development, tacitly confirmed reports that he was leaving. In a post on X, Patel thanked his co-workers and Musk for “the past eight years at Tesla.”

Investors often welcome job cuts because they can lead to higher profits. But that was not the case Monday, with Tesla shares ending the day down more than 5%.

Musk’s email to employees was earlier reported by Electrek, an online news site, and Handelsblatt, a German business newspaper.

Musk did not indicate where the cuts would be made. Many of Tesla’s workers are based at four large car factories in Fremont, California; Austin, Texas; and Shanghai and near Berlin. Tesla also has a factory in Buffalo, New York, that produces charging equipment and a factory near Reno, Nevada, that makes batteries.

Musk’s many other ventures, and his penchant for making polarizing political statements, have raised questions about his focus on managing Tesla. Wall Street is increasingly concerned about the company: Tesla’s share price has lost about one-third of its value this year.

Many investors had expressed hope that Tesla would revive flagging sales by introducing a car that would sell for about $25,000 as early as next year, increasing the number of people who could afford the company’s cars and responding to competition from Chinese companies that are already selling electric cars for as little as half that price tag.

Musk cast doubt on those plans by announcing this month that Tesla would unveil a Robotaxi in August. The self-driving taxi is seen as a long shot, in part because even the most advanced systems available today sometimes make glaring mistakes.