Hormel Foods Corp. reported a weaker-than-expected profit in the third quarter, hurt by higher pork and feed costs.

However, the packaged food maker said it was able to adjust for these costs towards the end of the quarter, allowing it to reaffirm its full-year adjusted profit forecast.

In June, the company had cut its full-year earnings forecast blaming higher costs for chicken, pork and beef.

The higher costs, especially that of bacon, squeezed the company's margins in the quarter ended July 28, particularly in its largest division -- refrigerated foods.

Sales at the division, which contributed half of total revenue, rose 2 percent in the quarter -- the slowest among its five divisions. Profit fell 26 percent due to the higher costs.

The company's total sales rose 8 percent to $2.16 billion.

Profit rose to $113.6 million, or 42 cents per share, from $111.2 million, or 41 cents per share, a year earlier.

Analysts on average were expecting earnings of 45 cents on revenue of $2.12 billion, according to Thomson Reuters I/B/E/S.

Hormel bought Unilever Plc's Skippy peanut butter brand in January, aiming to mitigate some risks associated with its lower-margin meat businesses.

The deal helped sales at Hormel's grocery business grow 25 percent, faster than its other divisions. The division contributed 17 percent to total sales.

"We expect four of five segments to outperform in the fourth quarter, with only specialty foods expected to experience a down quarter," Chief Executive Jeffrey Ettinger said in a statement.

The specialty foods business, which sells items such as sweeteners and ready-to-drink beverages, posted a 5 percent rise in sales. It accounted for 11 percent of sales in the quarter.

The company still expects to earn $1.88-$1.96 per share in fiscal 2013. Analysts expect profit of $1.95 per share.

Hormel's shares closed at $42.11 on the New York Stock Exchange on Wednesday.