(Bloomberg) -- On Twitter, Elon Musk is a right-leaning, irreverent firebrand. In Washington, he’s a smooth political operator who knows his way around power.

The chief executive officer of SpaceX, Tesla Inc. and Twitter Inc. slipped into Washington under the radar this week and popped up in the offices of House Speaker Kevin McCarthy and some senior House Republicans, who are about to begin investigations of President Joe Biden’s administration and family as well censorship on social media. 

He didn’t neglect Democrats, however. Musk tweeted that he met with Democratic leader Hakeem Jeffries and on Friday sat down with top White House officials in charge of implementing the Democrats’ Inflation Reduction Act.

This version of Musk belies the image of an executive as impulsive tweeter. He knows how to work both sides. 

Republicans, who just control one chamber of Congress, have little power beyond a messaging platform and the ability to hold up some bills. Democrats, who hold the White House, Senate and control federal agencies are the ones with influence over the new electric car tax credits that could affect both Tesla’s profits and Musk’s personal fortune.

The visit to Washington comes in a busy — and controversial — week for Musk. 

On Tuesday, he wrapped up three days of testimony in federal court in San Francisco as part of a long-running shareholder lawsuit over his failed 2018 attempt to take Tesla private. He then flew to Nevada for an event with Republican Governor Joe Lombardo, where Tesla announced $3.6 billion in additional investment in the state for battery production and manufacturing of its Class 8 electric Semi truck.

He’s also under scrutiny by the US Securities and Exchange Commission over his role in shaping Tesla’s self-driving car claims, according to a person familiar with the matter. 

Musk, 51, is famously impatient with government bureaucracy, but he is not a Washington outsider. His automotive, space exploration and social media companies operate in highly regulated environments. 

Tesla recently slashed prices on many of its vehicles so that they would qualify for the federal tax credits. Though Musk has denounced tax credits in the past, the lower prices and potential for consumers to qualify for the federal tax credit will likely bolster demand for Tesla’s vehicles amid competition from other automakers.

Musk, whose net worth is largely tied up in Tesla stock and options, last year became the the first person in history to have $200 billion erased from their personal fortune, according to the Bloomberg Billionaire’s Index. He’s since recovered slightly, now worth $155.7 billion, but down from a $340 billion peak in 2021.

He met with several members of Congress on Capitol Hill Thursday and Friday. Besides dropping in on McCarthy, he saw Oversight Chair James Comer and Judiciary Chair Jim Jordan.

Comer has set a Feb. 8 public hearing to pursue a conservative sore point: the decision by Twitter in October 2020, before it was owned by Musk, to restrict access to a New York Post article about a laptop purportedly owned by Hunter Biden, the president’s son and a prime focus of Comer’s committee.

McCarthy remarked on Thursday that Musk had come “to wish me a happy birthday.” On Friday, he said they spoke about how Twitter can be fair to both parties, adding that Musk’s “whole thing” is about respecting the First Amendment.” 

Jeffries’ office declined to comment on their meeting.

Musk didn’t get a White House invitation, but two top Biden aides, John Podesta and Mitch Landrieu, met with him at Tesla’s Washington office on Friday.

White House Press Secretary Karine Jean-Pierre called the encounter “important,” though she omitted any direct mention Musk or his companies.

“I think the outreach and the meeting says a lot of how important the president thinks the bipartisan infrastructure legislation is, and how the Inflation Reduction Act is, especially as it relates to EVs,” she said.

The Treasury Department is still working out the regulations that will determine which car models qualify for the tax credits, giving Musk a window to influence the final product. 

Democrats kept Musk at arms length this week. He has praised Florida Governor Ron DeSantis, a potential Republican presidential candidate in 2024, and predicted that he could defeat Biden, who rarely mentions Musk or Tesla when he discusses electric vehicles and the automobile industry. White 

Musk hasn’t invested much of his wealth in politics, donating just $529,000 since 2009, Federal Election Commission records show. He’s given both to Democrats and Republicans, but his giving has shifted more toward the GOP in recent years. He hasn’t made a donation since 2020, FEC filings show.

Committees connected to McCarthy have received $129,000 from Musk, more than he gave any other politician. McCarthy called Musk “a good friend of mine” in a lengthy floor speech he gave in November.

Musk has tweeted that he’s a registered independent and politically moderate, though he does feel passionate about some issues including the environment. He’s also said that his political contributions are a tiny fraction of the amount he gives to the Sierra Club.

--With assistance from Akayla Gardner, Billy House, Justin Sink, Bill Allison and Laura Litvan.

©2023 Bloomberg L.P.