Macy’s is shrinking to grow.

That’s the message from the retailer’s management, which on Thursday said it would close 100 full-line stores, most by early 2017, on top of the 41 shuttered last year.

It’s the single biggest round of store closings for the 728-unit department store chain, which has long been regarded as having too many stores with weak presentations or stuck in sluggish markets, in large part stemming from its acquisition of May Co. in 2005, which doubled the size of the business. Declining mall traffic, changing consumer shopping preferences and needs, and competition from Amazon and other online players, fast-fashion and offpricers have compounded the issue.

The 100 store closings will result in an estimated $1 billion reduction in volume, bringing Macy’s down to about $26 billion in annual revenue, from $27.1 billion in 2015. None of the 38 Bloomingdale’s stores is closing.

“Decisions like this which impact people are very hard for all of us, but in effect it is preserving the jobs of hundreds of thousands of others,” said Terry Lundgren, Macy’s Inc. chairman and chief executive officer, in an interview.

He said Macy’s would disclose which stores are being closed at a later date, and that there was currently no estimate on the number of people who would lose their jobs.

“The reason we announce it now is to make sure our merchants and planning organization are buying to a smaller number of stores.” He also said that Macy’s would give people notice well in advance of their store closings and “do our best to transfer people to other Macy’s stores or find other job opportunities for them.”

“Obviously, the impact on associates and managers weighs very heavily on Terry and me and the decision-makers in this company,” said Jeff Gennette, Macy’s president, who is designated to succeed Lundgren as ceo in the first quarter of 2017.

But the store count reduction, Gennette stressed, will enable the company to “grow more aggressively in the stores that remain,” and grow the digital mobile, and app aspects of the business. “There are big opportunities…You can look forward to a company that expedites decision-making, moves faster, and is bolder in its approach to the customer,” Gennette said.

The executives last year indicated plans to focus more resources on the top 150 Macy’s stores that generate the most profits and sales, in effect indicating that there was plenty of room to trim its portfolio. On Thursday, Lundgren and Gennette said the company will continue to have a strong presence in 49 of the nation’s top 50 markets, despite the store closings. Jacksonville, Fla., is that one major market where Macy’s would like to operate a store but has yet to find the appropriate setting.

Along with store closings, Macy’s reported its results for the second quarter ended July 30. While the numbers were still down, they were better than expected and were improved over a year ago, leading to no change in the guidance for the year. Macy’s Inc. expects 2016 comparable sales to decrease in the range of 3 percent to 4 percent, and earnings per diluted share (excluding asset impairment charges and retirement settlement charges) to range from $3.15 to $3.40.

The news overall went over well with retail analysts and Wall Street, which lifted the Macy’s stock up 17 percent to $40 by midday.

“This is transformational and the beginning of more focus on destination stores in major malls and key downtown stores,” said retail analyst Walter Loeb. “Some of the smaller stores are going to go by the wayside. Probably some more stores will close” beyond the 100. “Lundgren wants to leave Gennette with a more profitable operation in good shape. He still has this year and the beginning of next year to really clean up things for Gennette.”

“In any industry, if the ground under you changes, you can either make incremental changes, or get act decisively to get ahead of the problem. After several years of lagging behind the curve, in one swell swoop Terry has put Macy’s ahead of the curve,” said Craig Johnson, president of Customer Growth Partners.

“He is leaving Jeff with a slightly smaller but much healthier enterprise, and will be exiting a proud retailer on a high note.”

Sales in the second quarter were down 3.9 percent to $5.87 billion from $6.1 billion in the year ago period, but strengthened month-by-month through the quarter. Comparable sales were down 2 percent, compared to a 5.6 percent drop in the first quarter. Macy’s net income fell to $9 million from $217 million, largely impacted by asset impairments and charges from upcoming store closings and retirement plan settlement charges. Excluding the charges, operating income came to $372 million versus $436 million a year ago.

Sales trends were positively impacted by more normal weather during the quarter, compared to earlier in the year; a smaller decrease in tourist spending, and stronger promotions including a new “Black Friday in July” event.

“We also are pleased that a number of sales-driving initiatives put in place in recent months are beginning to gain traction. These include additional investments in store staffing and visual presentation, the rollout of our enhanced fine jewelry departments, athletic/active apparel intensification, home store improvements and Last Act clearance strategy,” Lundgren said.

Macy’s has been battling against declining sales and profits for the last several quarters as consumers have switched much of their spending to the multitude of websites that now sell apparel, and have generally cut back on buying fashion and accessories in favor of spending on cars, eating out and vacations.

But last quarter, there was a sales lift in apparel at Macy’s, according to Lundgren, who told WWD that apparel trends were best in the denim, juniors, dresses, and athletic areas.

In other news, Macy’s is in negotiations to sell its 250,000-square-foot men’s store on Union Square in San Francisco for redevelopment. If a deal is struck, the men’s store will close and men’s wear will be sold at the 925,000-square-foot Macy’s flagship, across the street also on Union Square.

The company continues to explore opportunities for the Herald Square, State Street in Chicago, and Minneapolis flagships. Macy’s wants to capitalize on situations where the development or redevelopment of all or a portion of a real estate holding exceeds the value of its existing use. This will occur through sales of assets or portions of real estate, including some properties included in the 100 stores to be closed. Macy’s owns just over 50 percent of its stores, and leases the rest.

In downtown Brooklyn, the Macy’s flagship will be downsized and remodeled through a deal with Tishman Speyer. As reported, Macy’s will continue to own and operate the first four floors and lower level of its nine-story Fulton Street flagship. Tishman Speyer purchased the rest of the store and create office space over 10 floors.

Getting reflective on the mercurial nature of the retail industry, Lundgren observed that in recent history, “Every five to seven years there has been major setback or major disruption in our industry.Each time we had to respond.” He cited the onset of a retail downturn in 2015, the Great Recession beginning in 2008; the terrorist attack on the World Trade Center in 2001, and 1994 when Macy’s was taken out of bankruptcy and taken over by Federated Department Stores. The company later changed its name to Macy’s Inc.

He pointed out that in 2008, Macy’s closed eight buying offices to consolidate into one in New York. “That was a very hard change,” Lundgren noted. “Gut-wrenching. It impacted a lot of people, but it was followed by the five best years in our company’s history.”

In a conference call, Karen Hoguet, chief financial officer, said the company was pleased with the sales trend last quarter, which was “much improved from the first quarter and sets us up well for the remainder of the year.”

“Both Macy’s and Bloomingdale’s experienced improvement in the second quarter,” will apparel across the board improving, with a few exceptions such as handbags and watches.

She said Macy’s new Backstage offprice stores, which are both freestanding and set inside the full-line stores are “doing well in total, although performance by door is mixed as you would expect from a new business.”

Blue Mercury had a string of “terrific new store openings, including Tribeca and Columbus Circle in Manhattan and in East Hampton, N.Y. “We are optimistic Blue Mercury will contribute significantly to our beauty offering,” both inside Macy’s stores and with the freestanding Blue Mercury units. Macy’s bought Blue Mercury last year.

She also the company was pleased with its joint venture in China, with Alibaba’s T Mall, though it was “too early to judge” performance.

Last Act, Macy’s new clearance format inside the stores, has recently expanded beyond apparel to include handbags and will add shoes to the format at the end of this year

Hoguet said that despite the massive wave of store closings, “Macy’s will not lose representation in any top markets.” She added that “some of the sales will be retained by other [Macy] stores and”

Putting more resources in Macy’s top 150 doors “gives us confidence we can accelerate growth in these strategic locations.” They will benefit with “improved assortments, better service, improved technology, and more events,” Hoguet said.

Macy’s has a prototype in Easton Town Center in Ohio, emphasizing new concepts for the active, wellness, bridal and beauty categories, which will be rolled out, though it’s too early to be specific on the degree of the rollout, Hoguet said.

“Almost throughout the store, we are looking for ways to improve the assortment, to attract not only Millennials but older customers as well. You will see a lot of experimentation.”