Oil has occupied a central place in the American economy for the past century — powering houses, automobiles, factories and everything in between. As a result, the oil companies that drilled, shipped and sold black gold reaped billion in profit year after year and continue to do so.

But for the first time oil and gas companies are openly grappling with a less-than-certain future where climate change and related advances in other energy sources make them less dominant.

In its annual energy outlook released last week, BP said that it expected oil demand to peak in the next two decades as renewable energy grows and consumers purchase hundreds of millions of electric vehicles. In an outlook released in February, Exxon Mobil projected a peak in demand for gasoline in the coming decades and acknowledged that some of its assets “may not be attractive investments” as a result of the shifting energy market.

These changes may sound subtle, but they signify a marked shift in direction in an industry that for years fought government climate regulation and in many cases sought to murky the science underpinning the need for action on global warming.

“The recognition of the energy transition has grown over the past year with the oil and gas players,” says Marie-Helene Ben Samoun, a Houston-based partner at the Boston Consulting Group. “They are not only acknowledging global warming, but they are also acknowledging the energy transition and the impact on their own portfolio.”

The biggest change for oil and gas companies will be the declining need for oil to power the internal combustion engine as electric vehicles become more prevalent and the remaining gas-powered cars become more efficient. Exxon Mobil projected this year that demand for liquid fuel for passenger vehicles will likely peak by 2040. BP reports that the total number of electric cars could hit 300 million by 2040 dealing a significant blow to fuel consumption. That rise plays a significant role given that nearly half of oil consumed in the U.S. in 2016 was used to produce motor gasoline, according to data from the Energy Information Administration.

Fossil fuel companies also face increased competition from renewable energy sources. Exxon Mobil projects 400% growth in wind and solar power by 2040 while BP says renewable energy will make up 40% of growth in energy production in the same period. Today, wind and solar make up around 7% of the U.S. electricity supply.

But despite the enormous challenges oil and gas companies insist they have an integral role in the future of energy. Natural gas, along with renewables, will continue to replace coal in the power sector. And oil remains an essential product for petrochemicals, jet fuel and other refined petroleum products. In some cases, oil companies will shift some of their refineries from making gasoline to making other petroleum products. Spencer Dale, BP’s chief economist, described the future of oil demand as one of “plateau rather than peak.”

“The suggestion of some people that the rapid growth in electric cars will lead to the collapse in oil demand is just not born out in the basic arithmetic,” Dale said at a presentation in Washington D.C. this week. “The world will need to carry on investing in new oil production for many years to come in order to meet the worlds oil needs.”

The acknowledgement from oil companies is subtle enough that a casual observer could be forgiven for missing it, but it still represents a remarkable shift. In some cases, oil companies have understood the risk climate change posed to their business for decades while spending heavily to undermine the credibility of climate change science and undercut policy efforts to address it.

That posture has changed as the science of climate change has become increasingly undeniable and countries across the globe push the energy sector away from fossil fuels. Despite a burst of environmental deregulation and climate change skepticism from President Donald Trump, most large oil and gas companies today acknowledge climate change and try to push for policy solutions that will still leave them a significant role in the energy future.

“You can act in the U.S. market, but in the end your demand is made by consumers and that market is global,” says Samoun. “The global trend is happening no matter what the regulator would do.”

But the growing acknowledgment of climate change and the coming evolution of the energy sector is a business decision. And oil and gas companies are not necessarily working to address the issue beyond stabilizing their bottomline. A report this month from the 50/50 Climate Project, a non-profit that pushes big business to address climate change, highlights a slew of recent initiatives undertaken by oil and gas companies to slow progress on climate change. More than 20 of the country’s biggest utilities and oil and gas companies lack measured consideration of the risks of climate change, according to the report.

Ultimately, while the oil and gas industry’s vision of a low-carbon future may have inched closer to the position of scientists and policymakers concerned about climate change, the two opposing sides still remain mile apart with no bridge in sight.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Justin Worland at justin.worland@time.com.