Sears Holdings Corp. (NASDAQ:SHLD) has just reported its first quarterly profit in nearly two years. Net income attributable to Sears’ shareholders was $244 million, or $2.28 per share. On an adjusted basis, the company reported a net loss of $2.15 per share, compared with the $3.05 per share loss expected by Wall Street analysts.

Unfortunately, quarterly sales have continued their years-long decline. Total revenue fell by more than 20 percent to $4.30 billion. Same-store sales falling accounted for $417 million of the company’s overall sales decline, while store closures accounted for $557 million of it.

Sales at Sears’ U.S. stores open more than a year fell 12.4 percent due to declines in sales of home appliances, apparel, and lawn and garden items. Sales at Kmart declined 11.2 percent due to weakness in grocery and household items, pharmacy, apparel, and home categories.

Sears Chief Financial Officer Robert Rieckert directly attributed the company’s profit to the sale Craftsman tools brand. Sears sold its Craftsman brand to Stanley Black & Decker in March for about $900 million, to be paid out over the next several years after an upfront payment of $525 million. Without the sale, the company said it would’ve reported a loss of $230 million, or $2.15 per share, for the quarter, compared to a loss of $199 million, or $1.86 per share, one year ago.

Sears CEO Eddie Lampert says that the company needs to speed up efforts to improve performance. The company has not posted an annual profit in six years. Once the largest U.S. retailer, Sears has been struggling to turn around its business. Competition from Wal-Mart Stores and Amazon.com has severely hurt the company.

The worsening retail environment hasn’t helped. A couple of months ago, Sears expressed doubts about its ability to continue as a going concern. The company’s shares are down 18 percent since then.

Sears has been closing stores and squeezing costs to cope. The company has a goal of cutting costs by $1.25 billion and says it has cut up to $700 million in costs since February. Total liabilities at the end of the quarter was $12.6 billion, down from $13.19 billion at the end of the fourth quarter.

Get Analysts' Upgrades and Downgrades Daily - Enter your email address below to receive a concise daily summary of analysts' upgrades, downgrades and new coverage with MarketBeat.com's FREE daily email newsletter.