BP's latest Energy Outlook sees peak oil on the horizon for the first time -- driven by the rise of shared and autonomous electric vehicles.

Under the Evolving Transition (ET) scenario, which assumes that policies and technology continue to evolve at a speed similar to that seen in recent past, oil demand slows and eventually plateaus in the late 2030s.

At the same time, the total passenger vehicle fleet will nearly double to 2 billion cars by 2040 -- including more than 320 million EVs, up from roughly 3 million today. This represents a significant increase over previous forecasts.

In the ET scenario, there are nearly 190 million electric cars by 2035, which is nearly double the 100 million EVs forecast in the base case of last year’s Energy Outlook. The stock of electric cars is projected to increase by an additional 130 million in the subsequent five years, reaching the total of 320 million cars by 2040.

Several other energy research groups have upped their EV forecasts in recent years. However, BP's latest projection ranks among the most ambitious.

By the end of BP's forecast period, the number of EVs will have grown to around 15 percent of the total car fleet. But the number of EVs doesn't tell the whole story. When it comes to understanding the future energy mix, it also depends on how vehicles are used.

In a divergence from previous reports, BP examined vehicle kilometers traveled while powered by electricity to account for the combined impact of vehicle electrification, shared mobility and autonomous driving. EVs are expected to supply the vast majority of shared, autonomous transportation due to lower maintenance costs and lower emissions profile.

Because they're used with much higher intensity, EVs will account for 30 percent of passenger vehicle kilometers by 2040, up from just 2 percent in 2016. According to BP chief economist Spencer Dale, the average EV will be driven about 2.5 times more than an internal combustion engine (ICE) car.

"This higher share reflects the importance of EVs in shared mobility, where the lower costs per km of EVs make them more competitive than ICE cars, as shared-mobility cars are used much more intensively," the report states. "In particular, the sharp fall in the cost of car travel associated with fully autonomous cars, which start to become available in the early 2020s, leads to a substantial increase in shared mobility (and use of EVs) in the 2030s."

Increasing prosperity in developing countries is expected to more than double the demand for travel by passenger cars over the coming decades, under the ET scenario. But increased vehicle fuel efficiency stemming from tighter emissions standards, combined with the trend toward electrification and shared mobility, will largely offset the impact of increased car travel on liquid fuel demand.

By the end of the forecast period in the Energy Outlook, these changes will actually begin to make a dent in oil use. Liquid fuel demand from the car fleet is forecast to hit to 18.6 million barrels per day in 2040, down slightly from 18.7 million barrels per day in 2016.

Oil will continue to dominate across all segments of the transportation sector through 2040, despite the rise of alternatives.

Demand for oil and other liquid fuels, including biofuels, grows over much of the forecast period. However, it gradually slows in the later years of the forecast, and by the late 2030s BP expects oil demand to decline for the first time.

Efficiency gains in passenger and freight transport, as well as aviation and marine, will increase energy use in transport by only 25 percent over the forecast period, which is far less than the 80 percent increase during the previous 25 years.

The non-combusted use of oil and gas, while currently accounting for just 10 percent of global demand, will become the largest contributor to oil and gas growth from 2030 on. Oil majors, including BP, Shell and Total, are banking on sustained petrochemical growth. But like transportation, this sector also faces the possibility of disruption.

BP notes that increasing environmental pressures could dampen demand for some petrochemical products, particularly single-use plastics. Strict new policies on plastics consumption could curb oil demand by as much as 2 million barrels per day, which is roughly the same impact forecast from EVs.

In Wood Mackenzie's forecast for a carbon-constrained world, petrochemical feedstock demand growth is positive in the near term, but slows markedly to 2035.

Greater prosperity, particularly in developing economies, will continue to drive growth in energy demand. By 2040, global energy consumption is set to increase by roughly one-third.

But, as in the transportation sector, overall growth will be slower than in previous years. Global energy demand in the ET scenario grows at around 1.3 percent over the Energy Outlook period, down from over 2 percent in the previous 20 years.

"This slowing in demand growth is largely due to energy intensity (energy used per unit of GDP) falling more quickly than in the past: global GDP more than doubles over the [forecast period], but energy consumption increases by only 35 percent," the report states.

Economies will become more efficient as they continue to electrify over the next two decades. At the same time, they'll become increasingly powered by renewables.

BP revised its renewable energy forecast up in the latest Energy Outlook, projecting that renewables will increase their share of total power generation from 7 percent today to around 25 percent by 2040. Renewables will be the fastest-growing power resource over that period -- and any similar period. "The closest parallel is the rapid build-up of nuclear power in the 1970s and 1980s," the report states.

In 2035, global solar power is more than 150 percent higher than in the base case of the 2015 Energy Outlook. This reflects solar costs falling faster than anticipated. BP now projects solar will be widely competitive by the mid-2020s -- 10 years earlier than previously expected.

As renewable energy sees greater adoption, China and other parts of the developing world will take over from the EU as the primary engine of growth. Over the forecast period, China will add more renewables than the entire Organisation for Economic Cooperation and Development (OECD) countries combined.

Looking beyond power generation to primary energy consumption, natural gas will grow rapidly over the course of BP's forecast. Coal consumption, meanwhile, will broadly remain flat, with its share in primary energy declining to 21 percent -- the lowest share for coal since the industrial revolution.

"The energy mix by 2040 is the most diversified ever seen," according to BP.

In the power sector, however, coal will remain king.

Coal accounts for just 13 percent of the increase in power over the forecast period compared to more than 40 percent over the previous 25 years. Even so, it remains the largest source of energy for power generation in 2040, with a share of almost 30 percent.

Overall carbon emissions will also continue to rise through 2040, "signaling the need for a comprehensive set of actions to achieve a decisive break from the past."

If world leaders choose to take a different tack, the outcome could look very different.