IRVING (AP) — Buoyed by higher oil prices, Exxon Mobil reported Friday that third-quarter profit jumped 50 percent from a year ago to nearly $4 billion.

The oil giant also sharply increased spending on exploration, reversing a trend from the first half of the year. Lower capital spending had raised concern about future production of oil and gas, since projects in the energy business can take years before there is meaningful production.

READ MORE: Appeals Court Ruling Keeps Abortion Ban In Place In Texas

Exxon’s profit was dinged by Hurricane Harvey, which briefly shut down refineries along the Texas Gulf Coast, but the results still beat forecasts from Wall Street analysts.

“A 50 percent increase in earnings through solid business performance and higher commodity prices is a step forward in our plan to grow profitability,” said Darren Woods, who became chairman and CEO around the start of the year.

Woods said that for a fourth straight quarter the company generated enough cash from operations and selling assets to cover dividends and investment in the business.

Exxon, the biggest U.S. oil company, earned $3.97 billion, compared with $2.65 billion a year earlier.

Income was 93 cents per share, despite a hit of four cents per share from the hurricane in late August.

READ MORE: Amtrak Train From Fort Worth Crashes In Oklahoma, Four Hurt

Exxon does not adjust reported results based on one-time events such as storm-related shutdowns or asset sales. Even with the setback from Harvey, the results still beat the average estimate of 89 cents per share from 10 analysts surveyed by Zacks Investment Research.

Revenue rose 13 percent to $66.17 billion. The average forecast of four analysts surveyed by Zacks was $63.51 billion.

Capital spending, which had fallen when oil prices were at their nadir, soared 43 percent from a year earlier to nearly $6 billion.

The Irving-based company also said it spent more on income taxes — $1.5 billion compared with $337 million in the same quarter of 2016.

In trading about an hour before the opening bell Friday, Exxon shares rose 47 cents to $83.92. Through Thursday’s session they had fallen 7.5 percent this year while the Standard & Poor’s 500 index rose 14 percent. The stock has decreased 4 percent in the last 12 months.

MORE NEWS: Critical Race Theory Law Could Be Behind Latest Southlake Racism Controversy

(© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)