Norfolk Southern (NSC) reported a 24% jump in its fourth-quarter earnings, as growth in the railroad operator’s general merchandise revenue overshadowed continued weakness in coal.

The Norfolk, Va.-based company said Wednesday its profit checked in at $513 million, or $1.64 a share, compared to year-ago results of $413 million, or $1.30 a share. Revenue rose 7.3% to $2.88 billion.

Norfolk Southern beat expectations for both the top and bottom lines. Wall Street analysts were looking for per-share earnings of $1.50 and revenue of $2.85 billion.

Domestic utilities are looking for less coal amid low natural gas prices, a trend that has hit railroad companies like Norfolk Southern. In the latest period, an 8% drop in coal volume drove the segment’s revenue 2.4% lower to $641 million.

Revenue from general merchandise, the largest top-line contributor, was up 12% at $1.62 billion, as traffic volume rose 8%.

Intermodal revenue, which includes sales generated from moving freight by at least two modes of transportation, increased 5.8% to $618 million.

Last week, fellow railroad operator CSX (CSX) reported lower earnings due to higher expenses. Union Pacific (UNP) is scheduled to report earnings on Thursday.

Shares rallied 6.2% to $94.23 late Wednesday morning.

Follow Matthew Rocco on Twitter @MatthewRocco