Supermarket chain Kroger (NYSE:KR) showed how combining sales growth with buying back shares can lead to earnings expansion, all the while taking on and beating the competition.

The fourth-quarter results from the grocery chain underscored its strength in challenging industry titan Wal-Mart (NYSE:WMT) and according to internal calculations, it stole significant amounts of market share. In 38 of 44 major markets that it competes in, Kroger says it is either No. 1 or No. 2 and that its share rose by 65 basis points in 2006 overall.

One analyst cheekily referred to it as the "black death effect," in that whenever Wal-Mart moves into a market, most competitors die, but not everyone. If you're still standing after two years you are likely stronger than before.

Kroger demonstrated that it's apparently immune from the Wal-Mart plague. Sales in the quarter rose over 14%, boosted in large part by an exceptionally strong extra retail week. Indentical-store sales -- which Kroger defines as stores open for at least five quarters without expansion or relocation -- grew 5.3% over last year, excluding the benefit of fuel sales. Profits far exceeded analyst expectations, coming in at $384.8 million. The $0.54 per-share results enjoyed a $0.07 per-share benefit from the extra week, but that had been factored into Kroger's estimates, as well as analyst forecasts. The supermarket, though, thought the gain would only amount to $0.05 per share.

The supermarket is taking on Wal-Mart on its own turf. It competes against the discount retailer's supercenters in 32 markets and found that its market share increased by 75 basis points in 2006. Wal-Mart operates 1,000 of its 2,257 supercenters in these markets, and Kroger was able to steal share from the discount king in 26 of them. Kroger is expanding its Marketplace store concept, where it sells not only groceries, but also furniture, appliances, and home furnishings, with some locations featuring some of its own Fred Meyer's jewelry stores, a Starbucks (NYSE:SBUX), or even a pizzeria.

Kroger's continues to expand its organic foods segment, in both produce and meat, and continues to see good customer acceptance of the category. It still faces tough competition there from Whole Foods Markets (NASDAQ:WFMI), which has expanded its own reach with a coming merger with Wild Oats (NASDAQ:OATS).

Expanding its presence by keeping prices low to compete with Wal-Mart, while venturing into organics that are dominated by Whole Foods, could have been a tricky maneuver. Yet operating margins actually grew year over year to 4.1% as it reduced its overhead, at the same time boosting sales.

Six months ago, I had identified Kroger as my favorite grocery chain among choices like Safeway (NYSE:SWY) and Pantry (NASDAQ:PTRY). I thought at $23 a share, it was fairly priced but would have preferred to buy it at a discount. Results show I underestimated its potential. Coupled with share buybacks and paying down its debt, Kroger's has improved its position and looks poised to generate additional shareholder gains.

For more these produce peddlers, check out:

Starbucks and Whole Foods are recommendations of Motley Fool Stock Advisor. Wal-Mart is a recommendation of Motley Fool Inside Value. Whatever your investing style, The Motley Fool has a newsletter for you. Take a 30-day no-cost trial subscription today.

Fool contributor Rich Duprey owns shares of the black death Wal-Mart but does not own any of the other stocks mentioned in this article. You can see his holdings here. The Motley Fool has a disclosure policy.