Just over a year ago, the Securities and Exchange Commission had launched an investigation into Elon Musk after he tweeted that he planned to take Tesla private.
He was facing criticism, and a defamation lawsuit, for calling a Thai-cave rescuer a "pedo guy" and "child rapist." And when Musk took a hit off a joint during an Internet broadcast, it triggered a safety review from NASA that was concerned the billionaire maverick was going off the rails.
But now Musk is on a roll, literally dancing his way forward past a thicket of controversies. Tesla's stock price has quadrupled, and the company's market value now is greater than GM's and Ford's combined. A jury acquitted him in the defamation suit. And SpaceX is on the cusp of its first human spaceflight, having just completed what Musk called "a picture-perfect" test flight.
President Donald Trump even compared him recently to Thomas Edison, calling him "one of our great geniuses."
Most notable for some is that Musk, known for taking to Twitter to tout his successes and lash out at his critics, has demonstrated restraint. He hasn't tweeted any sensitive numbers about the publicly traded Tesla, and he kept silent after NASA pronounced the software in Boeing's Starliner capsule - SpaceX's competitor for sending people into space - so flawed that more than a million lines of code must be meticulously reviewed, a process that could take months.
People who follow Musk closely say they've noticed the change. Rebukes by regulators and the serious responsibility of sending astronauts to space, now weeks away, have humbled him, they say.
"Elon's not dealing like he's under the vice anymore, and he is acting more reasonable," said Gene Munster, managing partner of analyst firm Loup Ventures.
That doesn't mean there aren't challenges ahead. Tesla is launching its new crossover SUV in the first quarter, and new vehicles in the past have become a production stumbling block. Tesla also revealed last week that it's again under investigation by the SEC.
And though he may have been humbled, he remains refreshingly unfiltered. He recently danced on stage in China, performing what some dubbed a strip tease, shrugging his hoodie off and then throwing it. He told a recent SpaceX event on the rushed timeline to build a rocket he hopes will get to Mars: "My new thing is management by rhyming: If the schedule is long, it's wrong; it if it's tight, it's right." He also recently released a song that climbed the charts on Spotify after he tweeted to his 30 million followers a shot of himself jamming to the beat.
The track's title also served a four-word manifesto: "Don't Doubt Ur Vibe."
Musk's relentless focus on Tesla, in particular, has begun to pay off.
Musk's goal of injecting electric cars into the mainstream is becoming reality, and Wall Street has begun to accept that. The company's stock has long been besieged by short sellers, gambling that the company won't achieve its goals. But the short sellers are reeling, prompting headlines such as this recent one in the Wall Street Journal: "Detroit Falters as Tesla Excites."
"There are still things they need to work through," said Munster. "It's still going to be bumpy. But as far as the core concept - 'Will Tesla make it or not make it?' - that question has now been decided. Tesla is going to be around for decades."
Musk, who was bullied as a child in South Africa and made his way to North America as a teenager, has always had a combative streak that often pitted him against the establishment. He took on the credit card industry with PayPal, where he was CEO until he was ousted in 2000.
He remained the company's largest shareholder, however, and pocketed $259 million when PayPal was acquired by EBay for $2.3 billion. He founded SpaceX in 2001 and disrupted the military-industrial complex that for years had held a strong hold over America's space industry. His investment in Tesla didn't come until 2004, when he was named the company's chairman of the board. He became CEO in 2008. Forbes estimates his net worth at more than $67 billion.
The low point for Musk came during the summer of 2018. A slate of top executives had left Tesla, which had been struggling and laying off employees in droves. The company was having difficulty delivering on its rosy production promises, and Musk said on Twitter that the company had graduated from one nightmare to another - "from production hell to delivery logistics hell."
He lamented to the New York Times that August in an interview that, "This past year has been the most difficult and painful year of my career. It was excruciating."
The company was struggling to achieve its goal of delivering 5,000 Model 3 cars per week.
Tesla never truly delivered on the core marketing component of the Model 3 - that it would be a $55,100 car, making it affordable to the masses. While a model costing that price was available briefly last year, it was pulled from Tesla's traditional online sales hub and moved to special order status.
Musk had long been turning attention - some said too much attention - to the intricacies of the company's product lineup and assembly line. And he made decisions in haste, axing products on impulse without embarking on market research.
"Get it off the website now," he said, after one executive presented what he saw as a compelling case.
When the company failed to meet its output for Model X SUVs because the falcon-wing doors were so hard to fit, "Elon moved into the factory for two weeks," said a former Tesla executive who spoke on the condition of anonymity in order to discuss internal company matters. "He was sleeping in a sleeping bag - real time triaging cars at the end of the line trying to get to the root cause of what the issues were. It was wild."
Musk also got hands-on when the company was facing a lag because of paint. "Elon wasn't satisfied," the former executive said, "and so he took over the paint shop. He ran the paint shop for two weeks."
His agony was compounded by a self-inflicted wound - when he took to Twitter to announce that if Tesla's stock price reached $661, he would take the company private.
"Funding secured," he wrote on Aug. 7, 2018, in a pronouncement that shocked investors and sparked an SEC investigation that resulted in a lawsuit accusing him of misleading investors and seeking to bar him from running any public company.
Musk ended up settling soon afterward, paying a $31 million fine and agreeing to step down as Tesla's chairman for three years.
Late in 2018, it was officials on the ninth floor of NASA headquarters who were fuming over his behavior. Musk had recently puffed a joint while appearing on the Joe Rogan show and took a sip of whiskey - not the sort of conduct NASA is used to seeing form the heads of one of their prime contractors.
In this case, NASA was relying on Musk's SpaceX to build a spacecraft capable of flying its astronauts to the International Space Station. And NASA administrator Jim Bridenstine, a teetotaling conservative Republican former congressman from Oklahoma, didn't appreciate the message it sent.
He ordered a safety review of the company and publicly chastised Musk, saying that "culture and leadership start at the top. Anything that would result in some questioning the culture of safety, we need to fix immediately."
SpaceX went to great lengths to show that it prioritises safety over all else. And in March of last year, it successfully flew its Dragon spacecraft to the International Space Station and back, a feat that seemed to erase any concerns from Bridenstine, who crowed after the 2:49 a.m. launch that SpaceX had helped put NASA on the "precipice of launching American astronauts in American rockets from America soil."
Speaking at the pre-dawn press conference, Musk said he "was emotionally exhausted" and that the flight was "super stressful," and the culmination of "an incredible amount of hard work and sacrifice."
The high didn't last long.
A month later, that same spacecraft blew up during a test of its emergency abort system, sending an ominous cloud of orange smoke wafting into the Florida sky.
At Tesla, everything started to stabilise once Musk had a new team he could trust to deliver in 2019.
Gone were the days when Musk moved into the manufacturing plant, overseeing mundane elements of production personally, such as the Model X production, the company's paint shop and later the Model 3's lagging due to overemphasis on automation.
Finally, he began to delegate, more and more, becoming more comfortable after the revolving door of executives finally left him with a team he could trust, former officials and close observers said.
The Model 3 line was ramping up and meeting delivery goals. Tesla opened a factory to produce cars in China. The stock started rising. And Musk did a dance - arms pumping, jacket tossed to the side - at an event in Shanghai celebrating the first car deliveries in China that went viral and symbolised the sudden turn-around.
Still, there are many perils ahead.
Musk faces serious questions about core pieces of Tesla's business model that could send the company back to its near-constant volatility over the last few years, which saw the company's stock dip to a record low of $278 as recently as June. Even earlier this month, the stock rose nearly 14 percent to $1397 before falling 17 percent the next day. It closed above $1450 a share on Wednesday before following the market down on Friday.
One of Musk's biggest tests will be the first deliveries of its new Model Y crossover. Tesla has faced questions about demand now that a $11,814 federal tax credit for electric vehicle purchases has expired. Musk acknowledged the challenges on a call with analysts last month, though it was not demand that concerned him. "We are worried about production, [making] sure we get that production ramp going and reach volume production as soon as possible," he said.
It's also not out of the regulatory line of fire. Tesla revealed earlier this month that the SEC had subpoenaed the company seeking records concerning "certain financial data and contracts including Tesla's regular financing arrangements" in December, just as the agency closed the investigation into Musk's tweets. The company separately revealed that the Department of Justice was seeking documents on Musk's communications about taking the company private and Model 3 production. It also faces probes by the National Highway Traffic Safety Administration into safety regarding both its Autopilot assistant and alleged battery fires.
If Tesla & SpaceX go bankrupt, so will I. As it should be.
And then there's the question of whether Musk can safely fly astronauts - a feat SpaceX hasn't yet tried. That test is likely to come this spring, when SpaceX is expected to fly two NASA astronauts, Doug Hurley and Bob Behnken, to the International Space Station.
In January, SpaceX nailed a test flight that showed off the capsule's emergency abort system, paving the way for the first flight with crews on board. Garrett Reisman, a former NASA astronaut who worked at Space X for years and still serves as a consultant, said Musk and the people at SpaceX know "to never believe things are going to be as great as they are during the highs, and not as low during the lows."
Still, he said, the abort-system test "was a huge morale boost" that fired up Musk and his whole team.
It showed. Hours after the flight, Musk, who turns 49 in June, was loose and in a good mood, holding forth before a gaggle of reporters at the Kennedy Space Center. One of them urged him to show off his dance moves, as he had done in Shanghai when Tesla opened a factory there.
But he demurred, saying maybe he would consider it once he had flown astronauts safely. "I'm not your dancing puppet!" he said, laughing.