Apparently investors remembered that discount retailer Kmart (NASDAQ:KMRT) still holds some valuable assets: its stores. Following news that the recently bankrupt merchandiser had agreed to sell 24 stores at unnamed locations to do-it-yourself merchant Home Depot (NYSE:HD) for upwards of $365 million, shares of Kmart surged 14%.

The creator of the blue-light special has been on a tear, cutting costs and boosting profits since it emerged from bankruptcy last year. The focus of CEO Julian Day has been on making money, not growing at this point. Shearing underperforming or non-performing stores from its portfolio -- it sold some 600 stores during bankruptcy proceedings -- will allow the company to concentrate on merchandising.

Yet with 1,500 locations in many urban areas, the real estate assets are an attractive jewel for companies like Home Depot. That's where Home Depot wants to make inroads, as does its archrival, Lowe's (NYSE:LOW). Both home center mavens have bid on Kmart properties in the past.

Kmart was "the original big-box retailer," said a research analyst with National City Wealth Management. "They were the first. They have the best locations."

Kmart has been able to extract a premium price for the stores -- about $15.2 million each -- simply because of their location. These are high-traffic, strong-retail metropolitan areas, and the Big Orange says it will convert them as soon as it can. The home improvement center has purchased 24 stores from Kmart before and wants to open 185 total in 2004. It currently operates 1,746 home centers.

By spending less on advertising and inventory, and refusing to open more stores until it gets its act together, Kmart has generated four straight quarters of profits.

Some analysts believe the company is turning away from the superstore concept, realizing it can't compete with Wal-Mart (NYSE:WMT) or Motley Fool Stock Advisor pick Costco (NASDAQ:COST) as a destination for groceries. Rather, it will concentrate on its core competency of merchandising, stocking shelves with products related to the WB television network (just in time for the back-to-school season), along with new fashions from Latina pop idol Thalia. And it has been emphasizing exclusive brands such as Martha Stewart homewares and Joe Boxer clothing.

Sitting on an empire of valuable real estate, Kmart can cull the sites least in line with its strategic vision. Right now it's fun to be the land baron king. Sooner or later, though, the company will have to prove it can still grow sales.

Fool contributor Rich Duprey has worn Home Depot's orange apron in the past, but he does not own any stocks mentioned in this article.