J.M. Smucker Co. (SJM) on Thursday posted higher quarterly profit, helped by strength in its namesake fruit spreads and Jif peanut butter.

But, like other packaged food companies, Smucker also said that higher energy and petroleum costs would pressure its earnings in the second half of the year, with earnings per share possibly increasing less than its long-term growth target.

The company said earnings in the fiscal second quarter ended October 31 were $46.4 million, or 79 cents a share, compared with $38 million, or 65 cents a share, a year earlier.

Excluding merger and restructuring costs, earnings were 86 cents a share. On that basis, analysts on average had forecast 82 cents a share, according to Reuters Estimates.

Sales rose 3 percent, to $606.3 million. Analysts on average had forecast $609.8 million, according to Reuters Estimates.

For the rest of the year, the company expects additional costs of 10 cents to 15 cents a share from rising resin, freight and natural gas costs.

Smucker said it expects earnings per share will be up 5 percent to 8 percent for the year. The company's long-term target is 8 percent growth. Analysts on average forecast earnings of $2.79 a share for the year, up 7.3 percent from $2.60 last year, according to Reuters Estimates.