Lord & Taylor is being bought by a little-known, 7-year-old clothing rental service based in Silicon Valley.

The oldest department store chain in the US will be sold by its current owner, Toronto-based Hudson’s Bay Co., to San Francisco-based Le Tote in a $100 million deal, the companies said on Wednesday.

Under the agreement, Lord & Taylor puts Le Tote on the map while the tech company gives the department store a chance to be relevant again, infusing it with cutting-edge technology in customer service.

The idea is to allow shoppers to return their rentals to Lord & Taylor stores and pick up new ones at the stores, Le Tote’s president and co-founder, Brett Norhart, told The Post. Likewise, Le Tote plans to introduce proprietary technology that helps customers with styles and fits.

“You’ll see those things pop up in stores very soon,” the executive added. “Most retailers collect a lot of data, but they aren’t really doing interesting new things with it.”

Le Tote will take over the operations at 38 Lord & Taylor stores, keeping most of the employees, and will take ownership of the company’s intellectual property.

“Brand building is a long expensive exercise,” Norhart said. “Being able to partner with a brand that has a very loyal customer base is exciting for us.”

Toronto-based Hudson’s Bay, however, will retain ownership of Lord & Taylor’s real estate and will retain a 25% stake in the venture. In 2021, Hudson’s Bay has the right to take back certain stores under the terms of the agreement.

“It looks like a good deal for both sides,” said retail consultant Jan Kniffen. “HBC gets out of Lord & Taylor without paying out big severance packages and Le Tote gets access to a brand that still has some cache.”

Le Tote is still lining up financing for the deal, which calls for HBC to receive $75 million in cash and another $25 million after two years. But Norhart said he expects to cinch the financing within the next few weeks.

Founded on Manhattan’s Lower East Side in 1826, Lord & Taylor was put on the block in May, just months after the landmark building that housed its Fifth Avenue flagship got sold to another new economy startup, the office-sharing company WeWork.

Details of the new partnership are still being worked out, including whether and how Lord & Taylor’s year-old partnership with Walmart continues.

Le Tote wants to grow Lord & Taylor into a national chain, according to Norhart, opening smaller stores on the West Coast and in the South where there are currently none.

Hudson’s Bay, which has owned Lord & Taylor since 2006, will cover the rent for the stores for the first two years. Over time, the partners will shrink the store sizes but add more locations, said a source with knowledge of the deal.

“We’re excited to have reached an agreement with Le Tote that creates a new model for Lord & Taylor, bringing together fashion rental subscriptions with traditional retail,” HBC chief executive Helena Foulkes said.

While the department store industry is shrinking, accounting for just 1.2% market share today, the rental and resale business is growing at 40% a year for the past several years, reaching $40 billion in sales, according to Kniffen.

HBC, which also owns Saks Fifth Avenue, said Lord & Taylor represented $1.4 billion of HBC’s $9.4 billion in retail sales last year.