New York (CNN Business) Sears is going to have a hard time surviving its bankruptcy. Kmart faces even longer odds.

Traditional department stores, including Sears, face heavy competition from big box retailers and online competitors, namely Amazon ( AMZN ). Still, some department store chains — Macy's ( M ) and Kohl's ( KSS ), to name two — are profitable.

But the discount retail space is even tougher for Kmart. It faces competition from Walmart ( WMT ) and Target ( TGT ) at one end of the market, and Dollar Tree ( DLTR ) and Dollar General ( DG ) at the other. Both discounters are profitable and growing rapidly.

Sears and Kmart have been in a somewhat unhappy marriage since they merged in 2005 to form Sears Holdings.

Sears Holdings filed for bankruptcy last week. The company says it intends to stay in business, but experts have doubts about the long-term viability of both brands.

"In my mind, they're both in terminal condition," said Jaime Ward, the head of the retail lending group at Citizens Bank.

Kmart store closings have left the company a small fraction of its former size.

It was still a retailer in search of a profitable market niche when Eddie Lampert bought it out of bankruptcy in 2003.

"I think Kmart was too far gone by the time Lampert took over to be salvaged unless he or someone was willing to invest a tremendous amount of capital," said Mark Cohen, a former CEO of Sears Canada and now the director of retail studies at Columbia University. Kmart failed to keep up with Walmart and Target, he added.

Kmart was always operating at a much thinner gross profit margin, which compares sales revenue to the cost of goods. Sears had established brands, such as Kenmore and Craftsman. Kmart had to compete purely on price.

During its heyday, Kmart was known for its "blue light" specials, sales announced in the stores that lasted for only 15 minutes.

Kmart's losses started in 2011, just as other retailers were emerging from the Great Recession. And it has closed stores, while sales declined, ever since. Sears suffered too, but the decline was steeper at Kmart.

Between 2010 and August 2018, Kmart closed more than 70% of its stores. Of the 360 stores that remained, another 110 have already closed or will close soon.

Sears Holding pulled back on advertising for Sears. The marketing budget for Kmart virtually disappeared. Kmart become an afterthought.

One of the original Kresge's 5-and-dime, the precursor to Kmart.

Like Sears, Kmart started at the end of the 19th century. Sebastian Spering Kresge opened a five-and-dime store in downtown Detroit bearing his name. The Kmart name didn't come about until 1962, and the chain grew rapidly for several decades. It claimed the segment of the market that big box stores would eventually dominate.

Kmart became known for its 15-minute-long "blue light specials": a store would flash a blue light and announce "attention Kmart shoppers" over the public address system. The specials started in 1965 but were discontinued in 1991, although Kmart has tried to bring the back a couple of times.

Sports Authority and Borders eventually went out of business after their own bankruptcies. In the early 1990s Kmart went on a buying spree, purchasing Sports Authority , a majority of OfficeMax and book retailer Borders . It sold all three a few years later.Sports Authority and Borders eventually went out of business after their own bankruptcies.

Kmart, losing to Walmart and other rivals offering good prices, filed for bankruptcy in 2002. It had 2,100 stores, or about three times what the combined Sears and Kmart have today. It used that bankruptcy process to close more than 300 stores and dump debt to strengthen its balance sheet.

The two brands were never a good fit. Kmart's own problems only distracted Sears Holdings' top managers from their efforts to fix Sears.

"It's difficult to run two retail brands with different merchandise and consumer strategies," said Greg Portell, head of the retail practice at consultant A.T. Kearney. "There are relatively few areas where you could see synergy between Kmart and Sears."