HOUSTON (Reuters) - Exxon Mobil Corp XOM.N, the world's largest publicly traded oil producer, posted a lower-than-expected quarterly profit on Friday as weakness in its chemical and refining operations offset a boost from higher crude prices CLc1LCOc1.

FILE PHOTO: A view of the Exxon Mobil refinery in Baytown, Texas September 15, 2008. REUTERS/Jessica Rinaldi/File Photo

It was the second consecutive quarter of weakness in Exxon units that make gasoline, plastics and related products. Exxon blamed weak margins for the income drop in those segments.

Shares of Irving, Texas-based Exxon fell 2.5 percent to $78.86 in premarket trading.

The company posted net income of $4.7 billion, or $1.09 per share, compared to $4.01 billion, or 95 cents per share, in the year-ago quarter.

By that measure, analysts expected earnings of $1.12 per share, according to Thomson Reuters I/B/E/S.

Profit jumped more than 50 percent in the company’s upstream division, which pumps oil and natural gas, thanks largely to rising commodity prices.

In the downstream refining unit, though, profit fell 12 percent, and in the chemical unit, profit dropped 14 percent.

Production fell 6 percent to 3.9 million barrels of oil equivalent per day (boe/d).

Exxon said earlier this month it resumed production at the Papua New Guinea liquefied natural gas (LNG) project a fortnight ahead of schedule after it was shut down in the wake of a deadly earthquake in February.

The shutdown cut quarterly earnings by $80 million and production by about 25,000 boe/d, Exxon said. The company has struggled in the past 16 months to unwind some of the biggest bets taken by former Chief Executive Officer Rex Tillerson, who left to become U.S. secretary of state in early 2017 before being fired by President Donald Trump last month.

Exxon has recorded billions of dollars in writedowns amid falling production since Tillerson left, and successor CEO Darren Woods has moved quickly to try to repair operations.

Woods laid out a bold plan last month to double annual earnings by 2025 through heavier investments in U.S. shale, Guyana and several LNG projects around the world.

The company plans to hold a conference call with investors to discuss quarterly results on Friday morning.

Exxon rival Royal Dutch Shell RDSa.L on Thursday posted a 42 percent jump in first-quarter profit, its highest earnings in more than three years.