Sears is getting a much needed lift from perhaps its greatest nemesis: Jeff Bezos.

The iconic but cash-starved retailer reached a deal with Amazon to install tires purchased on that website, Sears announced Wednesday.

Amazon also agreed to start selling Sears' DieHard brand of tires. But Sears' Auto Centers will install all tires purchased on Amazon, whatever the brand, for a fee.

The announcement pumped some needed life into Sears stock, lifting shares 19% in midday trading soon after the announcement.

Amazon already sells tires online, giving shoppers a network of different auto shops at which to have the tires installed.

DieHard tires and Sears' installation services were listed on the Amazon site soon after the announcement.

This is not the first deal between Amazon and Sears. Last year Sears started selling its Kenmore appliances on Amazon, the first time it had allowed the sale of that brand at any other retailer. It started selling DieHard products other than tires on Amazon late last year.

Sears is still struggling to raise cash, stem huge losses and battle a steady decline in sales. It is trying to find buyers for the Kenmore and DieHard brands after selling its Craftsman tool brand last year to Stanley Black & Decker (SWJ).

Related: Alexa, can you save Sears?

Total sales at Sears Holdings (SHLD), which includes both Sears and Kmart, plunged nearly 25% in 2017. A lot of that was because of store closings, but even at stores that stayed open, sales fell 14% for the year. And it has posted losses totaling $10.8 billion since 2010, its last profitable year.

Sears problems go well beyond the competitive threat posed by Amazon. But the growing preference of shoppers for online purchases is clearly one of the problems for the department store chain.

But before Amazon became a force in the market, big box retailers from Walmart to Home Depot (HD) had already eaten away at much of Sears' core business. Its cash position has become so dire it has little money to invest on marketing or upgrading stores.

Related: Sears CEO offers to buy Kenmore brand

Doubts about its ability to remain in business has suppliers demanding cash up front, limiting the selection of goods available in its remaining stores.

Once it was the largest and most important retailer in the nation, akin to a combination of Walmart and Amazon in the mid-20th century.

Getting a deal to handle installation of someone else's sales would have been beneath it. Now it's one of few recent pieces of good sales news.

Meanwhile sales, profits and share price have been soaring at Amazon (AMZN). In just the first three months of the year, its profits more than doubled to $1.6 billion.