LONDON — One major energy company has invested in a solar power developer. Another is lifting its investments in wind energy. One has even placed a small bet on nuclear fusion.

Worried that pressures to mitigate climate change could eventually curb demand for their fossil fuel products, oil and gas firms are making major investments in an increasingly diverse array of businesses. On Wednesday, the French energy giant Total made the latest such deal, agreeing to buy a small electricity utility that would give it a foothold in the delivery of clean energy to customers.

The deal, worth 1.4 billion euros, or about $1.7 billion, for Direct Energie, which has 2.6 million customers in Belgium and France, appears to stand in stark contrast to Total’s traditional business. Total makes healthy profits producing oil and natural gas through enormous projects in complex and often-dangerous places, including in countries like Qatar and Angola.

But the deal fits what appears to be an accelerating trend — at least in Europe. Lacking a clear way to see how the energy industry will evolve over the coming decades, major oil companies have been investing in a wide range of activities, in the hopes of finding winners or, at worst, learning from the experience. In particular, they are making deals in cleaner energy technologies.