Spanish energy giant Repsol said Thursday its net profit dropped by 25 percent in 2023 as oil and gas prices fell and the company stepped up investments in low-carbon projects.

The group booked a net profit of 3.17 billion euros ($3.43 billion)) last year, down from the record 4.25 billion euros earned in 2022 when Russia's invasion of Ukraine sent fossil fuel prices soaring.

The company said the drop was due to volatile oil and gas prices which fell at the start of 2023 before rising in recent months.

Profit was also pulled lower by record investments of 6.2 billion euros made last year as part of a plan unveiled in 2020 to spend 18.3 billion by 2025 to "decarbonise" activities and achieve net zero carbon emissions by 2050.

The bulk of the investments last year, nearly 43 percent or 2.6 billion euros, were made in Spain and Portugal.

The company said its initiatives included producing renewable fuels from alternative raw materials such as vegetable oils, used cooking oils and biomass, as well as installing solar and wind capacity.

"Over the next four years we will stay the course on the strategy we presented in our previous plan to address the energy transition and we will focus on all the types of energy that meet our customer's needs," Repsol chief executive Josu Jon Imaz said in a statement.

"We are convinced that this approach, in which decarbonisation is an attractive opportunity to create value, grow, and be profitable, is the most appropriate one for us."

Repsol also announced it would increase its dividend by 30 percent to 0.90 euros a share and buy back more shares, mirroring a trend set by most other major oil and gas companies that have boosted shareholder returns despite lower profits.