PARIS, April 26 (Reuters) - French energy giant TotalEnergies posted a 22% decline in first-quarter earnings versus a year earlier as higher refining margins only partly offset a steep decline in natural gas profits.

Adjusted net income for the three months to end-March came to $5.1 billion, slightly above the $5 billion in a consensus estimate of analysts forecasts compiled by LSEG. (Reporting by America Hernandez; editing by Jason Neely)