Businesses are buying more renewable power, and oil majors want a piece of the action.European oil companies including BP PLC and Royal Dutch Shell PLC are building new wind and solar projects and striking deals to supply electricity to big corporate buyers like Amazon.com Inc. and Microsoft Corp. , treading into the domain of traditional power companies.

The moves come as more businesses look to limit their carbon emissions, with companies buying a record amount of renewable power last year and on track to hit a fresh high this year, according to data from BloombergNEF. Oil companies say securing long-term deals to supply electricity will provide a new source of income and underpin their expansion into wind and solar power as they seek to reduce their dependence on fossil fuels and prepare for a lower-carbon economy.

Power supply has historically been regional, with utilities generating and providing electricity to homes and businesses in an area, state or country. Some of these traditional power suppliers have been tapping into demand from businesses for green power for several years, and have decades of operational know-how.

Still, oil executives say their global reach and vast trading operations give them an edge as companies take a more international approach to sourcing power.

“We’re actively exposed to different forms of energy in a way that pure-play renewable companies don’t have,” said Dev Sanyal, BP’s head of gas and low-carbon energy. “We’re basically getting our wind from the Nordics, and we’re taking solar from Spain… We’re providing a blended offer.”

Corporate power-purchase agreements are an area of focus for BP’s solar-power joint venture Lightsource BP, which this year signed deals to supply Amazon, Verizon Communications Inc., and a unit of insurer Allianz SE.

Mr. Sanyal said there was growing demand from customers seeking to reduce their emissions and that these deals provided BP with a source of stable, low-risk cash flows and returns.

Exxon Mobil Corp. and Chevron Corp. haven’t entered this business, another example of the divergence in strategies between the U.S. and European majors. Those U.S. companies have sourced renewable energy for their own use.

In Europe, Shell and Total SE are also seeking deals to supply companies with renewable energy as they start to pivot away from oil in anticipation of falling demand and look to boost their credentials in lower-carbon energy.

“There’s few companies that can offer the nature of solutions that we’re offering to a company like Amazon,” Shell Chief Executive Ben van Beurden told analysts earlier this year, noting the company could be a one-stop shop for electricity, aviation fuel and natural gas for trucks.

Corporate procurement is a small part of the overall renewable power market, but it’s growing fast. Companies bought a record 25 gigawatts of renewable energy globally last year, up 25% from the previous year, according to BNEF. That amount of renewable energy is equivalent to around four times California’s wind power-generation capacity at the end of last year, according to the U.S. Energy Information Administration.

New deals continue to be struck at a rapid pace, rising 75% in the first four months of the year versus the same period a year ago, the BNEF data showed.