The company said realized refining margins rose to $8.98 per barrel in the fourth quarter, from $6.47 a year earlier.

Excluding one-time items, the company earned $1.07 per share, beating analysts’ average estimate of 86 cents, according to Thomson Reuters I/B/E/S.

Phillips 66’s profit surged in the quarter as the refiner benefited from a $2.74 billion gain due to the recent changes in the U.S. tax law.

Refiners are likely to outshine other energy segments in 2018 as they benefit from a surge in U.S. oil production and rack up among the biggest gains from the recent corporate tax cuts, analysts said ahead of the earnings season.