Chocolate maker Hershey Co posted a higher-than-expected rise in quarterly profit, helped by price increases and market share gains.

The maker of Hershey's Kisses and Reese's Peanut Butter Cups also stood by its forecast calling for earnings per share to increase this year, but for the gain to be less than the company's long-term goal of 6 percent to 8 percent.

Hershey said first-quarter profit rose to $75.9 million, or 33 cents a share, from $63.2 million, or 28 cents a share, a year earlier.

Excluding one-time charges from the overhaul of Hershey's supply chain, earnings were 38 cents a share, up from 37 cents a year earlier. Analysts on average had forecast 35 cents, according to Reuters Estimates.

Hershey has been spending more on advertising in recent months to gain market share against rivals like Mars Inc, which bought Wm Wrigley Jr Co in October to become the world's largest confectionary company.

Hershey said its U.S. market share rose 0.5 percentage points in retail channels where such data is monitored.

First-quarter sales rose to $1.24 billion from $1.16 billion and exceeded the analysts' average estimate of $1.19 billion.

Hershey said in January that higher costs for commodities like cocoa and sugar, rising pension costs and weak consumer spending would weigh on 2009 results.

While dairy costs have so far been lower than the company anticipated, Hershey said it still expected significant commodity and pension costs increases this year.

Hershey shares were up 3.3 percent at $37.25 in trading before the market opened.

(Reporting by Brad Dorfman; Editing by Derek Caney and Lisa Von Ahn)