BP BP -0.28% PLC said it swung to a loss in third-quarter earnings resulting from a divestment-related charge and lower earnings in its exploration and production business. The London-based energy giant Tuesday posted a replacement-cost loss—a metric similar to the net income figure that U.S. oil companies report—of $351 million for the three months ended Sept. 30, compared with a profit of $3.09 billion in the year-earlier period.

Stripping out the one-off items, BP’s results exceeded analyst expectations, with the underlying replacement-cost profit at $2.25 billion, above a company-compiled consensus of 24 brokers’ estimates forecasting $1.73 billion. Still, the result was well below the same period last year when its underlying replacement-cost profit was $3.84 billion.

BP’s results exceeded market expectations as a result of better-than-expected downstream and Rosneft contributions, said Bernstein analyst Oswald Clint. BP holds around a 20% stake in Russia’s Rosneft. Looking ahead, the oil giant said it expects fourth-quarter production to be higher following the completion of seasonal maintenance and turnaround activities.