Self-driving cars, ride-hailing apps, shared electric vehicles, and new mass-transit options are reshaping the world as we know it.

For decades, oil and gas companies and utilities dismissed electric cars. Now, the old petroleum and power giants are muscling into the driver’s seat of the “new fuels” industry.

It’s projected to be a big business. McKinsey counts more than 350 new electric vehicle (EV) models debuting by 2025, one of the conditions for mass-market adoption. Global demand for gasoline is set to peak around 2021 thanks to electric vehicles (EVs) and fuel efficiency gains. The energy research and consultancy Wood Mackenzie predicts charging infrastructure investment in the US will exceed $18 billion annually by 2030 for equipment, installation, operations, and services. China is expected to have three times more energy demand from EVs by then.

Now, fossil fuel incumbents want in. They’re investing heavily or outright acquiring electrical infrastructure needed to supply the millions of electric vehicles (EVs) expected in the next few years. Although just 2.2% of the world’s vehicles are electric, a record 2 million or so EVs were sold last year amid exponential growth.

While the numbers aren’t huge yet—for example, Shell’s $1 billion in renewable energy and EV investments amounts amounts to just 4% of its annual capital expenditures—they’re growing fast. Globally, $334 billion (pdf) was invested in global clean energy in 2017, reports Bloomberg New Energy Finance (BNEF).

Public charging infrastructure is ramping up almost everywhere, and each region has its own unique mix of players, says BNEF. In Europe, 79% of the public charging infrastructure is operated by utilities and oil companies. In the US, 62% of the market is managed by pure-play EV operators. In China, equipment manufacturers control the majority.

So far, European firms are making the biggest moves. The most recent move was Royal Dutch Shell’s purchase of Greenlots, a startup offering software and services for EV charging networks. The British-Dutch oil giant says it will use Greenlot’s technology, which combines software to optimize battery charging and grid balancing services in one charging platform, to build the “foundation” of its EV business in North America. The company is pouring about $1 billion a year into such deals, according to BNEF, including the acquisition of 30,000 charging stations in Western Europe, as well as a $31 million investment into EV charging startup Ample in 2018.

Last year, France’s Total closed a deal for G2mobility, which offers EV charging solutions, as well as a $1.7 billion deal for Direct Energie, making it a major electricity retailer in France as well. Ultimately, Reuters reports, Total wants to grow its “low-carbon energy assets” from 5% of the total today to 20% by 2035. Most of Europe’s biggest oil firms now have a hand in renewable energy, power trading, energy storage, retail electricity sales, grid management, or EV charging.

“In Europe, the line between utilities and oil and gas companies is getting a bit blurry,” said Colin McKerracher of BNEF at the group’s San Francisco Summit on Feb. 4. “The oil and gas companies in Europe see where this stuff is going and want to ensure they are not missing out on it. … It’s not just a downside hedge.”

The US is a different story. Companies like Chevron and ExxonMobil are just starting to edge into utilities’ traditional territory. Last year, Chevron participated in a $240 million round for ChargePoint, a network of independently owned charging spots, valued at $1.5 billion, according to Pitchbook. The utility American Electric Power and German automaker Daimler invested alongside the oil giant.

Most active are US utilities, with many partnering directly with car companies. Pacific Gas and Electric, Southern California Edison, San Diego Gas & Electric, and New Jersey’s PSE&G have partnered with carmakers to offer thousands of dollars in rebates for BMW, Nissan, and other brands. California’s Pacific Gas & Electric, New York’s Consolidated Edison, the southeast’s Duke Energy Company, and others covering almost every state are lobbying Congress to extend EV tax credits. Pacific Gas and Electric is busy investing in thousands of fast-charging stations around the state.