Not every retailer is hurting these days — just ask Best Buy.

Its shares shot up to reach an all-time high on Thursday, three months after CEO Hubert Joly declared its turnaround phase completed.

It was yet another sign that investors, who have been cautious given the downward cycle in consumer electronics, are buying into the Richfield-based electronics retailer's comeback and are becoming believers that it can thrive in the age of Amazon.

Best Buy's shares jumped more than 21 percent, surpassing $60 for the first time ever Thursday, after the company reported first-quarter sales and profits that surpassed both analysts' and the company's own expectations. In particular, the retailer managed to grow comparable sales in the U.S. by 1.4 percent, an impressive feat considering that the company had forecast a drop in the range of 1.5 to 2.5 percent.

Executives said they expected the sales momentum to continue, leading them to raise their guidance for the rest of the year.

There has been a growing opinion among investors that brick-and-mortar retailers can't compete with online-only retailers such as Amazon, said David Schick, lead retail analyst with Consumer Edge Research. But Best Buy's performance offers a counter narrative to that story line.

"These results are changing lots of minds this morning as to the efficacy and durability of their turnaround," he wrote in an e-mail.

Best Buy's results were one of few bright spots in an otherwise bleak 2017 so far for many retailers. Others — including Target, Sears and Macy's — are not as gracefully weathering the shift to online shopping. Meanwhile, Best Buy's online sales rose 23 percent in the quarter, accounting for 13 percent of its overall U.S. sales.

Of the 114 retailers Retail Metrics tracks, the weighted average of same-store sales for the first quarter was flat. It would have been negative had Wal-Mart not reported a small bump in sales, noted Ken Perkins, the firm's president. By comparison, Best Buy outperformed much of the industry.

"Expectations were really low going into the report," he said of Best Buy. "But they seem to be holding their own despite the onslaught from Amazon. They continue to invest in training of its associates, providing an experience you can't find from many other places."

Best Buy attributed the surprisingly strong sales in the February-to-April quarter to growth in gaming, helped by the launch of the Nintendo Switch, and higher sales in computing and connected home products. Smartphone sales also were not as weak as expected, and spending picked up once consumers received their delayed federal tax refund checks, executives said.

"Clearly, being the only leading, in fact the only national specialty retailer in the sector, gives us a great asset and we are able to provide great value to our vendors," Joly said on a conference call with analysts, adding that the retailer works closely with its partners in everything from marketing to product development.

Earlier this year, Joly declared the retailer's Renew Blue turnaround phase to be officially over and ushered in a new strategic phase aimed at finding growth through digital, services such as its Geek Squad and its international operations in Canada and Mexico.

Joly acknowledged at the time there were still challenges, and he said Thursday that Best Buy will embark on a third round of cost-cutting, following $1.4 billion in reductions over the past several years. The new cuts will shave $600 million over multiple years that will be used to fuel future investments. Some of those savings, executives said, will come from automation in parts of its business such as the supply chain and call center.

David Magee, an analyst with SunTrust Robinson Humphrey, said the new cost reduction program comes when Wall Street had assumed that there wasn't a whole lot more coming in that area. It will be critical in helping keep Best Buy's pricing competitive and keeping the heat on other players, he said.

He added that Best Buy is in a "sweet spot" right now as other full-service competitors have thinned out, making it more valuable to customers and vendors alike.

"It should be noted that [Best Buy] has been competing against Amazon for years, making the ongoing share gains that much more meaningful," he wrote in a research report.

During the quarter, one of Best Buy's biggest regional competitors bowed out. Unable to keep up with the fast-changing landscape, HHGregg has liquidated its remaining 220 stores. To help bring in more business, Best Buy has stepped up marketing efforts in markets where HHGregg had stores.

In addition, Joly said Best Buy is testing a new 24x7 tech help service in some markets in Canada and the U.S. It will also roll out nationwide this year an in-home adviser program that it began testing in a handful of markets last year. Through this service, consultants make free home visits and advise consumers how to better equip their homes with the latest technology to address their needs.

"The early indications are very positive," Joly said of the program.

In the first quarter, Best Buy's net earnings were $188 million, down from $229 million in the same quarter a year ago when it benefited from some settlement proceeds. When adjusted for one-time expenses, it earned 60 cents a share, which was better than the 40 cents analysts were expecting and the 43 cents it reported a year ago.

On Thursday, executives also raised Best Buy's sales forecast for the year to 1 percent growth on a 52-week basis, up from its previous plan for flat growth.

Earlier this month, Best Buy announced it was rolling out a pilot program with Vivint Smart Home to 400 stores by the end of the summer. The partnership includes home monitoring services as well as design, installation and repair.

Kavita Kumar • 612-673-4113