The U.S. Senate and House have passed bills that could effectively ban states and cities from buying railcars and buses from Chinese-owned companies.

Warren Buffett is one of the biggest shareholders of Chinese electric vehicle company BYD.

Buffett's Berkshire Hathaway has made 600% on the investment, but shares of the company have been falling lately.

A major Warren Buffett investment is now a direct target in the latest twist in the U.S.-China trade war, and not from China. Not from Donald Trump, either, at least not directly. Also in the crosshairs are hundreds of U.S. factory jobs, another instance of the collateral damage trade tensions are imposing on the U.S. economy.

Earlier this month, the House of Representatives passed an annual defense policy bill that would, among other things, block local public transit agencies from spending federal funds to buy railcars made by companies that are either owned, controlled or subsidized by the Chinese government. A Senate version of the bill, passed in late June, would apply to buses as well.

And that's where Buffett, the legendary investor and CEO of insurance conglomerate Berkshire Hathaway, comes in.

Get Breaking News Delivered to Your Inbox

About a decade ago, Buffett invested $232 million into what was then a little-known Chinese battery company called BYD. In the past decade, BYD has grown into China's largest manufacturer of electric vehicles, including buses, where it has a significant business in the U.S. that employs about 800 workers at a plant in Lancaster, Calif. BYD has sold nearly 350 electric buses to communities in 14 U.S. states -- and Lancaster's mayor has credited the BYD plant with revitalizing the city.

BYD has also been a major winner for Buffett, at least until recently. At the end of 2016, Berkshire's 8% stake in BYD was worth nearly $2 billion, making it Buffett's most valuable investment outside of the U.S., although still just a slice of Berkshire's $200 billion investment portfolio.

Shares of the electric vehicle maker have dropped lately, however, falling to nearly $6.50 from a high of $10.50 back in late 2017, in part because tensions over trade and fears about the Chinese economy but also because of a decline in public subsidies for electric vehicles around the world. Buffett's stake was recently valued at $1.4 billion.

How a China ban could actually cost U.S. jobs

The new defense policy bills, if passed, could further damage BYD's business and shares. Roughly 60% of state and local transit authority budgets are tied to federal dollars. BYD's electric buses can cost over $1 million each, or up to 50% more than those powered by diesel fuel.

Members of Congress have said the reason for the provisions banning Chinese manufacturers have to do with security issues. Secret location trackers or cameras in buses could be used to send surveillance information back to China's government, for instance. BYD is a private company, but it has received subsidies from the Chinese government, including billions to replace Shenzhen's 16,000-bus fleet entirely with electric vehicles.

But the ban comes amid rising trade tensions between China and the U.S. Earlier this year, the U.S. decided to blacklist Chinese telecommunications giant Huawei Technologies Co. President Donald Trump has said he broadly supports the transportation measure. And BYD does have a direct U.S. rival in the electric bus market, Proterra, based in Burlingame, Calif. Trade groups representing U.S. manufactures have spoken out in support of the transit measures.

Buffett, a vocal Democrat, supported Hillary Clinton in the 2016 election. Earlier this year, Buffett said no one person should take credit for the strength of the U.S. economy, which was seen as a swipe at President Trump. Nonetheless, like Mr. Trump, Buffett, despite his investment in BYD, has in the past been in favor of measures that would limit imports into the U.S. and boost U.S. businesses over foreign competitors.

It's not clear that banning municipalities from buying buses and railcars from Chinese manufactures would boost U.S. jobs. First, nearly all of the buses that BYD has sold in the U.S. are manufactured in its factory in California. BYD hasn't said what would happen to those jobs. A spokesperson for company said it is watching the developments in Washington, D.C., but no decisions have been made.

What's more, the ban comes at a time when a number of cities are questioning whether the switch to electric buses makes sense. Electric buses have struggled in extremely cold or hot weather. The city of Albuquerque recently returned the buses it bought from BYD, saying the vehicles ran out of charge about 100 miles faster than the company had promised. (BYD disputed that claim in a lawsuit, which the two parties settled.) That could be just as big a deal for BYD as any trade-war related ban.