After years of huge losses and store closings, the future is officially in doubt for Sears and Kmart.

Sears Holdings (SHLD), the holding company for the two iconic retail brands, warned investors late Tuesday that it can't promise it will stay in business.

It included the language in its annual report while insisting it might still turn things around.

"Our historical operating results indicate substantial doubt exists related to the company's ability to continue as a going concern," said the statement.

While its recent history has been written in red ink, Sears was once one of the nation's most powerful companies, both the Walmart and Amazon of its time. But its once-proud brands have mostly been forgotten by the modern American shopper.

Related: A look at Sears through the years

Now Sears Holdings is not even sure it can raise enough cash through loans and debt financing to survive. The company owes $4.2 billion, up from about $3 billion a year ago.

It lost $2.2 billion in the fiscal year ending in January and has not turned an annual profit since 2010. Its losses since then total $10.4 billion.

Sears Holdings said its ability to sell assets, such as stores and store leases, could be limited because it needs those assets to pay for pension plans. In January, Sears sold its Craftsman brand of tools to Stanley Black & Decker (SWJ). It is looking to sell Kenmore appliances and Diehard auto parts.

Related: How Sears changed America

The company issued a statement later Wednesday stressing that despite the cautionary language in the annual report, it believes it is on course to turn around its struggling business.

"It is very important to reiterate that Sears Holdings remains focused on executing our transformation plan," said Chief Financial Officer Jason Hollar. "This is evident in the decisive actions we have taken in recent months. Despite the risks outlined we remain confident in our financial position."

Related: There's a retail bubble -- and it's bursting

Still, Sears Holdings has been in trouble almost since the 2005 merger that joined the two department store brands.

At the start of 2006, it had 3,400 U.S. stores and 370 more in Canada that it has since sold. By the end of this January, it had only 1,400 stores left, all in the United States. The company still has 140,000 employees, but that too is down sharply from the 355,000 it had in 2006.

Even that doesn't tell the full picture of the decline.

Sears was once the nation's largest retailer and business employer. Long before the ascendance of Walmart (WMT), and decades before Amazon (AMZN) was even born, the Sears catalog was how many Americans learned to shop from home for a large variety of items they wanted.

It developed an extensive store network, helping furnish homes as Americans moved to the suburbs after World War II -- and causing trouble for small, locally owned shops.

Related: Sears sells Craftsman

The company at one time grew to include not just the retail business but a bank, a brokerage, a real estate company and what was then the world's tallest building, the Sears Tower, for its Chicago headquarters.

Kmart had a proud tradition of its own as one of the first major discount chains.

Its history, like that of Sears, stretches to the late 19th century. It became known for its "blue light specials," short-lived sales signaled by a flashing light and a public address announcement.

Kmart also bought many other retail chains that have since gone out of business, including Borders Books and Sports Authority. It filed for bankruptcy in 2002 shortly before Sears merged with its remains.

The retail landscape is littered with storied brands that have closed in recent years as brick-and-mortar stores became an albatross in the face of growing competition online.

Just in the last year, Sports Authority and The Limited have closed, and RadioShack and American Apparel are both in their second bankruptcies and in danger of shutting down. Macy's (M), JCPenney (JCP) and Staples (SPLS) have announced widespread store closing plans.

The problems for Sears started well before the growth of online shopping. More than 20 years ago, it began to suffer from competition from low-price competitors such as Walmart, and big-box stores such as Home Depot (HD). It lost its place in the Dow Jones index of the nation's most important companies in 1999.

Then came growing competition from Amazon and other online retailers. Analysts said Sears Holdings did little to invest in either the Sears or Kmart brand, instead trying to cut its way back to profitability by trimming advertising and closing stores.

It announced plans to close 150 more stores in January, and its stock hit a post-merger low in February. Then the stock rebounded when the company announced a deal with creditors to borrow $140 million more and cut at least $1 billion in operating costs a year, along with reducing its debt and pension obligations by $1.5 billion.

The "going concern" warning sent shares down about 15% in midday trading Wednesday.