HOUSTON (Reuters) - Exxon Mobil Corp’s third-quarter profit nearly halved, hit by lower oil prices and weaker margins in refining and chemicals, with its three major business reporting lower year-over-year profit.

FILE PHOTO: A logo of the Exxon Mobil Corp is seen at the Rio Oil and Gas Expo and Conference in Rio de Janeiro, Brazil September 24, 2018. REUTERS/Sergio Moraes/File Photo

Earnings fell to $3.17 billion, or 75 cents per share, in the quarter, from $6.24 billion, or $1.46 per share, a year earlier, the company reported on Friday.(bit.ly/2WxMI0q)

It beat analysts’ recently reduced expectations for earnings of 67 cents per share. The company last month warned results would be hurt by weaker chemicals and lower oil prices, prompting analysts to reduce estimates from 86 cents per share.

“Maybe expectations were a little bit weak going in, but I think overall it is probably slightly negative relative to expectation,” said Anish Kapadia, director of energy at London-based Palissy Advisors.

Analysts at Tudor, Pickering, Holt & Co called Friday’s results “neutral for the stock.”

Exxon shares were up 1.3% in early trading on Friday.

Exxon’s results mirrored weaker earnings at rivals BP Plc and Royal Dutch Shell, which earlier this week indicated they might delay dividend increases or a buyback program because of low prices. Chevron Corp on Friday reported a 36% drop in third-quarter profit. Prices have fallen for oil and gas as U.S. shale producers keep pumping more oil amid slowing global consumption growth.

Exxon has been investing in major projects to boost production at a time when investors have been pressing oil companies to cut spending and increase returns to shareholders. It spent $7.7 billion in the third quarter, up from $6.6 billion the same period the year prior and higher than what analysts expected.

Exxon’s cash flow, a closely watched metric by investors, fell 24% from a year ago. Investors have been looking for the company to improve cash flow to cover its dividends and capital expenses.

Despite rising output from U.S. shale, profits in Exxon’s oil and gas production unit were down 49% to $2.17 billion on weaker prices, its lowest earnings in two years.

Its refining business earned $1.23 billion, down 25% from last year, on lower margins for its gasoline and diesel.

Its chemicals business was down 66% year-over-year. Results have been weaker because of global overcapacity in plastics and higher project expenses.

Exxon’s oil equivalent production rose about 3% to 3.89 million barrels per day, the fourth quarter in a row of year-over year gains.

Its production in the Permian Basin, the top U.S. shale field, rose 7% from the second quarter to around 293,000 barrels of oil equivalent daily.