The US government is cracking down on foreign investment in companies. And that could be a problem for Elon Musk's plan to take Tesla private.

Musk said on Monday that Saudi Arabia's sovereign wealth fund is eager to help finance a deal to take the electric car company off the public market.

Later that same day, though, President Donald Trump signed a bill that will give the government more say in which foreign countries and companies get to invest in American businesses.

And Tesla, with its long-range electric batteries and cutting-edge features for self-driving cars, has just the kind of technology the government is eager to protect.

The Committee on Foreign Investment in the United States, or CFIUS, comprises agencies across the government. It will now have more power to examine deals, even when the foreign investor is buying a minority stake.

The tougher rules, which passed with bipartisan support, were meant to check Chinese access to American technology.

CFIUS can recommend that the president block a deal on national security grounds. That has happened only five times since 1975. The most recent was earlier this year, when President Trump blocked a $117 billion hostile takeover of Qualcomm (QCOM) by Singapore's Broadcom (AVGO).

Saudi Arabia has generally been a more passive investor, taking minority stakes in US companies, although it did buy 100% of the nation's largest oil refinery last year.

It's almost inconceivable that it would buy a majority of Tesla, even if Musk succeeded in taking the company private.

But even a significant Saudi stake could raise concerns under the expanded government oversight. That is because Tesla has such valuable technology, said Julie Myers Wood, CEO at Guidepost Solutions, a security and compliance consulting firm.

It's hard to know how big a threat the law would pose to a Saudi stake, she said. "But this is the type of transaction we could see the Trump administration interested in. It's high-profile, and I do think the Trump administration is really interested in this underlying AI technology."

Lawrence Ward, an expert in national security law and a partner at the law firm Dorsey & Whitney, said it's a "no-brainer" that foreign investment in Tesla would trigger a CFIUS review.

In addition to artificial intelligence and self-driving-car technology, he said, the government has an interest in protecting the technology behind Tesla's long-range lithium batteries and solar panels, as well as data about drivers.

And a investment that takes a company private is likely to draw more attention, Ward said. That's because investors in a private company can have more control than in a public company.

Tesla did not respond to a request for comment.