The executive credited with reviving a struggling Best Buy is stepping aside.

Hubert Joly, 59, is handing leadership of the reinvigorated electronics retailer to longtime executive Corie Barry, 43, as part of the company's succession plan effective June 11. Barry, who is currently the company's chief financial and strategic transformation officer, will become the fifth CEO in Best Buy's 53-year history and the company's first female CEO.

Joly will become executive chairman of the board after stepping down.

It was only a few years ago when skeptics were ready to write the obituary of Best Buy. But under Joly, who took over as CEO in 2012, the company is being reinvented, focusing on driving online revenue as well as improving the in-store experience as many traditional retailers face dwindling foot traffic and sales. Online sales now account for about 22% of Best Buy's business.

Best Buy is also working to build deeper relationships and increase total revenue from customers who are shopping both online and in stores. That means reducing the time a customer has to spend at the pickup counter.

It's also means expanding services. Its free adviser service where salespeople visit customers at home to make recommendations on TVs and other electronics has been doing well. Last year, it launched a service that costs $199.99 a year that offers unlimited Geek Squad technical support. As of the latest quarter, it has signed up more than 1 million members.

The company is also pushing more into the health field, acquiring a company last year called GreatCall that provides emergency response devices for the aging.

Additionally, Best Buy now offers same-day delivery on thousands of items in 40 metropolitan areas and next-day delivery in 60 metropolitan areas.

Barry has been with the company in various executive jobs since 1999. She became CFO in 2016 and prior to that, served as the company's chief strategic growth officer. She will also join the board of directors, which is expanding to 13 members and will become majority female.

"Today's technology and consumer landscape creates tremendous opportunities for Best Buy to further expand and deepen relationships with our customers and employees, while continuing to drive shareholder value," she said in a statement.

In afternoon trading, shares of Best Buy Co. dipped 9 cents to $73.49.