ExxonMobil’s (XOM) third-quarter profit slipped 18% amid weaker refining margins that overshadowed exploration and production growth.

Exxon reported a profit of $7.87 billion, or $1.79 a share, compared to the year-ago period’s $9.57 billion, or $2.09 a share. Revenue climbed 2.4% to $112.37 billion.

The results beat Wall Street projections for per-share earnings of $1.77 and revenue of $107.39 billion.

Weaker margins, primarily related to refining, accounted for a $2.4 billion decline in Exxon’s refining and marketing profit, which tumbled 81% to $592 million. Valero (VLO), the world’s top independent refiner, also recorded weaker refining margins in the latest period.

Exxon, the world’s largest publicly traded oil company, became the largest natural gas producer in the U.S. after purchasing XTO Energy in 2010. Since the $25 billion deal, the company has acquired more shale-gas assets.

The company’s exploration and production unit logged earnings growth of 12% to $6.71 billion. Total third-quarter production ticked 1.5% higher on an oil-equivalent basis.

Exxon spent $3 billion for stock buybacks during the period.

Shares were marginally higher in pre-market trading Thursday, rising 14 cents to $88.95. The stock is up 2.6% as of Wednesday’s close.

Follow Matthew Rocco on Twitter @MatthewRocco