BP's first quarter profits fell by nearly a third but beat forecasts as lower oil and gas prices and weaker refining margins were offset by higher production and a stronger trading performance. 

The slump in profits marks the first significant dent in BP's steady recovery over the past 18 months following the sector's downturn 2014.

"We produced resilient earnings and cash flow through a volatile period that began with weak market conditions and included significant turnarounds," chief executive Bob Dudley said in a statement. 

BP's rivals Exxon Mobil, Chevron and Total all saw their profits decline in the first quarter. 

Higher oil and gas production was offset by weak income from refining as a result of particularly weak gasoline prices. Exxon posted its first loss in its refining business since 2009. 

The London-based company's first-quarter underlying replacement cost profit, the company's definition of net income, came to $2.4 billion, exceeding forecasts of $2.3 billion, according to a company-provided survey of analysts. 

That was down from $2.6 billion a year earlier and from $3.5 billion in the fourth quarter of 2018. 

The profits were boosted by stronger results from oil and gas trading, which in the past has often helped the company weather volatile markets. 

Cashflow from operations, which had risen to their highest level in four years in the previous quarter, fell by over 20% to $5.3 billion. 

Oil and gas production in the quarter, excluding BP's stake in Russia's Rosneft, rose 2% from a year earlier following the acquisition of BHP's onshore US shale portfolio and the start-up of new projects.