When a federal judge last week signed off on the gentlest of hand slaps for Tesla CEO Elon Musk for intemperate tweeting, it was a clear win for Musk's lawyer, John Hueston, in a faceoff against the U.S. Securities and Exchange Commission.

The high-profile save also underscores how Hueston's namesake firm, Hueston Hennigan—an Irell & Manella spin-off now entering its fifth year—has assumed a spot in the ranks of the litigation elite.

With about 50 lawyers (and several more soon slated to start), the firm is snagging crucial work on behalf of clients including Caltech—a whistleblower case is headed to trial in Los Angeles—Amazon, Amgen, PricewaterhouseCoopers, SoCal Edison and Palantir. In December, the firm also handed out enormous associate bonuses that “demolished the market standard set by Cravath,” according to Above the Law.

“We truly believe in bringing a disruptive approach to litigation,” Hueston said, adding that the firm in the last six months has turned away more work than it has accepted.

Musk ditched his prior counsel—a team from Williams & Connolly led by Dane Butswinkas, who signed on as Tesla's general counsel in December only to leave two months later—and replaced them with Hueston, who first made his name as a lead prosecutor in the Enron trial of Kenneth Lay and Jeffrey Skilling.

It wasn't clear up front what might have happened to Musk if the SEC had prevailed on its motion to hold him in contempt—a hefty fine, or perhaps even removal as CEO.

Jenna GreeneYou might recall the Tesla head first got in trouble with the SEC in August, when he tweeted “Am considering taking Tesla private at $420. Funding secured.”

“In truth and in fact, Musk had not even discussed, much less confirmed, key deal terms, including price, with any potential funding source,” the SEC said in its complaint filed in September.

(Also, ahem, in case you thought the agency wasn't hip, co-director of enforcement Steven Peikin did note that yes, they got the 4/20 “marijuana culture” reference—but that's no excuse for making false and misleading statements.)

Musk and Tesla promptly settled for $40 million—$20 million each. Tesla was also ordered to “put in place additional controls and procedures to oversee Musk's communications.”

In other words, Musk was to have a “twitter sitter,” who would provide “pre-approval of any written communications that contain, or reasonably could contain, information material to [Tesla] or its shareholders.”

But then, oops he did it again. On Feb. 19, Musk tweeted, “Tesla made 0 cars in 2011, but will make around 500k in 2019.”

Actually no. More like 400,000 cars.

Musk quickly caught the error, and followed up with, “Meant to say annualized production rate at end of 2019 probably around 500k, ie 10k cars/week. Deliveries for year still estimated to be about 400k.”

The SEC was not mollified. “Musk did not seek or receive pre-approval prior to publishing this tweet, which was inaccurate and disseminated to over 24 million people,” SEC lawyers wrote in seeking contempt sanctions.

The day after the errant tweet, Tesla and Williams & Connolly announced Butswinkas was resigning as GC and returning to the firm. He declined comment.

Hueston and firm partner Moez Kaba stepped in as outside counsel to convince the SEC to ease off.

(Also—let us please stop for a moment to appreciate the irony of the federal government going ape over Musk sending an inaccurate tweet, given the twitter habits of the current White House occupant.)

Hueston Hennigan lawyers have succeeded before in persuading the agency to back down. The firm on its website boasts of achieving “deauthorization and termination without action for a former Goldman Sachs managing director of a lengthy SEC and DOJ insider-trading investigation related to suspected tipping of the Galleon Group.”

“I have great respect for the SEC,” Hueston said. And in turn, he's found the agency “will respect and respond to lawyers” with credible (read: fear-inducing) trial experience. “Too many lawyers counsel compromise and settlement first, without truly testing” the agency's position, he said.

In court papers, he argued Musk's February 19 tweet didn't need pre-approval by Tesla counsel because it was immaterial—“simply Musk's shorthand gloss on and entirely consistent with prior public disclosures detailing Tesla's anticipated production volume.” Nor did it impact Tesla's stock price.

Moreover, he argued that the SEC's action “smacks of retaliation and censorship,” coming after Musk sharply criticized the agency on “60 Minutes.”

“The SEC took I think great reputational risk by trying to obtain the extreme relief of contempt of court in a speech-based regulatory oversight role,” Hueston told me, adding that the original order Musk allegedly violated was “fundamentally ambiguous.”

In court last month, U.S. District Judge Alison Nathan in the Southern District of New York de-escalated the proceedings. In one of the best-ever judicial admonishments, she told the parties to “take a deep breath, put your reasonableness pants on and work this out.”

So they did, despite disapproval by SEC Commissioner Robert Jackson, a Democrat, who in a statement said, “Given Mr. Musk's conduct, I cannot support a settlement in which he does not admit what is crystal clear to anyone who has followed this bizarre series of events: Mr. Musk breached the agreement he made last year with the commission.”

Musk did not admit wrongdoing, nor was he fined. Instead, he and the agency simply agreed on a more specific list of what is and isn't OK for him to tweet about without “preapproval of an experienced securities lawyer employed by the company.”

Hueston says believes the deal will provide a helpful guidepost to other companies as they grapple with CEOs using social media.

“Having bright lines was fundamental to our legal position,” he said.