In the past few years, Best Buy has turned a lot of its sales space into mini-shops to show off marquee brands. Now the Richfield-based electronics retailer is becoming a mini-shop for someone else.

In early November, Best Buy will open 300-square-foot electronics shops inside 10 Macy's stores around the country as part of a test that, if successful, could be rolled out to more stores next year. The locations of the initial batch of mini-shops have not yet been finalized.

Staff at the stores-within-a-store will wear Best Buy's blue shirts and will sell mostly products from one of its biggest vendors, Samsung. The lineup will include smartphones, tablets and smartwatches as well as cases and speakers. It will not include Apple products.

"Macy's is a great brand, and this test will give us additional ways to offer consumer electronics to customers," Carly Charlson, a Best Buy spokeswoman, wrote in an e-mail.

The partnership marks the return of electronics goods to Macy's, the largest department store chain in the United States. Retail experts said it also shows a willingness on Best Buy's part to think outside of its own box.

It could give Best Buy a presence in regional malls where it doesn't typically have stores aside from some small Best Buy Mobile stores, said Dave Brennan, co-director of the University of St. Thomas' Institute for Retailing Excellence. Both Best Buy and Macy's will likely gain access to new customers as a result of the partnership, he added.

"Is it going to be a magic bullet? Probably not," Brennan added. "But it's probably worth experimenting."

This is not the first time Best Buy has teamed up with another retailer. In 2012, it did a pilot program with Minneapolis-based Target Corp. in which it stationed its Geek Squad agents at a few dozen Target stores in Denver and Minneapolis. Those Best Buy employees helped Target shoppers with installation, repair and warranty plans. The test ended after six months.

The nation's largest electronics retailer has been in the midst of a multiyear turnaround under Chief Executive Hubert Joly as the company has slashed expenses, matched prices of online retailers such as Amazon, and strengthened its partnerships with key vendors through mini-shops. Last month, the company surprised Wall Street when it reported one of its best quarters in recent years with same-store sales up 2.7 percent.

Meanwhile, Macy's sales have been slipping, especially as consumers have shifted some of their spending away from apparel and shoes. On Tuesday, the company announced that it will shutter 35 to 40 underperforming stores early next year.

Macy's already has licensed shops in most of its stores — Sunglass Hut, Finish Line and Locker Room by Lids. It recently announced a plan to open a few hundred Men's Wearhouse tuxedo rental shops in its stores.

"Our customers have expressed interest in electronics for self-purchase and gift-giving, and this collaboration with Best Buy reinforces Macy's as a shopping destination throughout the year for the products that are most in demand," Jeff Gennette, Macy's president, said in a statement.

Brennan noted that department stores used to sell a little bit of everything compared with the more narrow selection of apparel, accessories and shoes they offer today. They even had groceries and appliances.

"Back in the 1990s, when computers were a hot new area, you would have found that Dayton's [later bought by Macy's] had a computer department," he said.

Kavita Kumar • 612-673-4113