Back in August 2018, Elon Musk casually announced on Twitter that he planned to take Tesla private at a price of $420 a share, a 20 percent premium at the time. He added that he had “funding secured.”
The announcement turned out to be much less secure than Mr. Musk had suggested, and it landed him in hot water with securities regulators, who asserted that he had misled investors. For more than a year after that, troubles seemed to mount for Mr. Musk and his electric-car company — including distribution challenges, a sales slump, quarterly losses, a liquidity scare and more legal problems for Mr. Musk.
All of that weighed heavily on Tesla’s share price, which fell as low as $177 in June.
But in recent months the company has seemed to turn a corner. Rising sales lifted Tesla to a profit in the third quarter, it unveiled a fourth car for its model line, and it completed a factory in China, a market of vast potential growth.
On Monday, its stock briefly reached a milestone, exceeding the $420 price that Mr. Musk once appeared to offer, before falling back. Mr. Musk’s Twitter feed featured a screen shot of a chart showing the intraday share price at $420.69 and two words: “stock art.”
A day later, the climb resumed, leaving the shares above $425 at the end of trading, a record. They are now up almost 70 percent in barely two months.
“It’s pretty dramatic how sentiment has shifted about the company’s outlook,” said Mike Ramsey, a Gartner analyst.
Tesla’s fortunes have risen as Mr. Musk has presented a more measured presence on Twitter this year, refraining from clashing as often as he did in the past with short-sellers — investors betting against Tesla’s stock — and other detractors online.
And Mr. Musk scored a legal victory this month when a jury in federal court in Los Angeles cleared him in a defamation case brought by a British man whom Mr. Musk had referred to as a “pedo guy.”
“It removes a major issue that was hanging over the company that could be really damaging to the brand,” Mr. Ramsey said. “Now he’s off the hook.”
Tesla did not respond to requests for comment.
Mr. Musk hasn’t eliminated all irreverence from his Twitter feed. After the stock passed the $420 mark on Monday, he tweeted, “Whoa … the stock is so high lol,” apparently a reference to the association between the number 420 and marijuana use.
Right after Mr. Musk proposed taking Tesla private at $420 a share, he appeared to take a puff of a marijuana cigarette during a podcast interview, one of the actions that had raised concerns about his behavior among investors and his own board members. The settlement later reached with the Securities and Exchange Commission to resolve fraud charges over the “funding secured” episode forced Mr. Musk to step down as chairman for three years and required closer company oversight of his communications with investors.
Tesla still faces plenty of challenges. Sales of its most profitable cars, the Model S luxury sedan and Model X sport utility vehicle, have plunged. It is spending heavily to ramp up production in China, build a plant in Germany and finish development of two new vehicles — a roomier version of its Model 3 sedan called the Model Y and a wedge-shaped pickup known as the Cybertruck.
On Jan. 1, Tesla will have exhausted the federal tax credit available to its buyers, effectively making its cars slightly more expensive just as more competing models are arriving on the market.
Mr. Musk has also promised to have a million self-driving cars on the road by summer, while other industry executives have concluded that autonomous vehicles are still several years away from widespread use.
Nevertheless, cost-cutting and continuing increases in sales of its most affordable car, the Model 3, have put the company into the black. It reported income of $143 million for the third quarter, when many analysts had expected a loss. It sold 97,000 cars in the period, helped by rising sales overseas.
Tesla needs to sell 105,000 cars this quarter to reach sales of 360,000 cars for the year. It had forecast 360,000 to 400,000.
The new factory outside Shanghai should help Tesla continue its growth streak. China is the world’s largest market for electric cars, but Tesla has been held back because import duties make its vehicles more expensive there. The new plant will produce the Model 3. The car will be eligible for incentives offered by the Chinese government aimed at encouraging purchases of locally made electric cars.
At the same time, Mr. Musk’s more measured presence on social media has eased concerns about the company’s decision making, Mr. Ramsey said.
“I have always felt the only thing that could truly derail Tesla was Elon going off the rails with his behavior,” he said. “And he has been more professional.”
In October, Mr. Musk said the Model Y would be available in the summer and probably outpace the Model 3 in sales. Last month, he unveiled the Cybertruck, although production probably won’t start for at least two years.
Tesla may be beaten in the race to offer an electric truck by another start-up automaker, Rivian Motors. On Monday, Rivian said it had raised $1.3 billion from investors including the fund manager T. Rowe Price, Amazon and Ford Motor. Earlier this year, Rivian announced three other rounds of funding totaling more than $1.5 billion.