Whole Foods Market Inc on Tuesday posted third-quarter earnings that beat Wall Street's expectations, as sales rose, and the seller of organic and gourmet food items raised its full-year earnings forecast.

Its shares shot up nearly 13 percent in extended trade.

Austin, Texas-based Whole Foods said net income rose to $42.8 million, or 25 cents per share, for the fiscal third-quarter ended July 5, from $33.9 million, or 24 cents per share, a year earlier.

Income available to its common shareholders rose to $34.96 million from $33.91 million, Whole Foods said.

Analysts, on average, expected 20 cents a share, according to Reuters Estimates.

Sales rose to $1.88 billion from $1.84 billion.

Same-store sales, which tracks sales at stores open at least one year, fell 2.5 percent. Identical store sales, excluding nine relocations and two expansions, fell 3.8 percent.

Whole Foods, which specializes in organic, natural and gourmet products, has shed jobs and pared spending as it works to be more competitive on prices amid a weak economy.

For the first four weeks of the fourth quarter ended August 2, same-store sales fell 1.1 percent and identical store sales declined 2.7 percent, Whole Foods said.

If its same-store and identical store sales stay in line with results so far in the quarter, Whole Foods forecast sales to rise about 2.9 percent for the fourth quarter and about 1 percent for the full year.

While that outlook was guarded, the company said it was raising it full-year earnings outlook, based on its better-than-expected performance so far this year.

Whole Foods now expects full-year, per-share earnings of 80 cents to 82 cents. It had previously expected to earn 65 cents a share to 70 cents a share including asset impairment charges, the company said.

For the fourth quarter, it forecast earnings of 16 cents a share to 18 cents a share.

Whole Foods shares were up 12.8 percent to $28.00 from its closing price of $24.82 on the Nasdaq.

(Reporting by Aarthi Sivaraman; editing by Carol Bishopric, Leslie Gevirtz)