Tesla Inc. has lost its third general counsel in the past year.

Jonathan Chang, a longtime attorney for the electric-car maker who was promoted to the role in February, left the company Dec. 6, according to people familiar with the matter. He’s taken the general counsel job at SambaNova Systems, the artificial intelligence startup announced Thursday.

Jonathan Chang Source: Tesla

Chang, 41, joined Tesla in 2011. He was thrust into the general counsel role in February after Washington-based trial lawyer Dane Butswinkas lasted just two months with the company. His predecessor was Todd Maron, a former divorce attorney who had been in the job since 2014.

Tesla shares pared a gain of as much as 2.8% on the news, trading up 1.6% to $358.22 as of 3:30 p.m. in New York.

Read more: Chang was a Tesla true believer

It was an eventful 9 1/2 months for Chang and Tesla. He took over from Butswinkas a day after Chief Executive Officer Elon Musk published problematic tweets about the outlook for vehicle production this year. Within a week, the U.S. Securities and Exchange Commission asked a judge to hold the billionaire in contempt of a 2018 settlement that required him to get social media posts that could be material to investors pre-approved.

Musk and the SEC settled in April. That month, Tesla started waging a legal battle against a short seller it accused of trespassing at its California assembly plant and menacing workers. And in August, Walmart Inc. sued Tesla over rooftop solar fires at more than a half-dozen of the retailer’s stores. The two companies resolved the issue out of court last month.

Last week, Musk, 48, emerged victorious from a four-day trial over another series of tweets in which he attacked a British cave expert who help rescue members of a Thai soccer team from a flooded cave. An eight-member jury unanimously decided his statements fell short of defamation.

Chang is leaving a company seemingly on firmer footing than it’s been when other senior managers have left the last few years. Tesla reported a surprise third-quarter profit in October and said it was ahead of schedule launching its next high-volume electric vehicle, the Model Y crossover. Its shares have surged more than 40% since then and are trading up for the year.

Tesla didn’t respond to questions including who will replace Chang, who declined to comment. The company, which is notorious for churning through top executives, has promoted from within of late rather than replace senior managers with splashy outside hires.

Other Tesla departures this year that the company back-filled internally include J.B. Straubel, the co-founder who ceded the role of chief technology officer in July, and Deepak Ahuja, the chief financial officer who retired in March.