Macy's said Wednesday that it will close 28 of its namesake department stores and one Bloomingdale's location as part of its annual review process.

The company operates about 680 department stores and 190 specialty stores.

Shares of the department store had jumped as much as 7% in premarket trading Wednesday after the company reported that holiday sales were better than some had feared. However, after the market opened and word of the store closures spread, Macy's pared those gains. The stock closed up 2.4%.

Same-store sales at the stores it owns and licenses fell 0.6% during November and December. At stores it has owned for at least a year, holiday sales dropped 0.7%, the company said Wednesday.

For the fiscal fourth quarter, which includes the critical holiday season, analysts had been calling for a 1.75% decline in same-store sales, according to a poll by Refinitiv.

Macy's has been trying to win back customers, as shoppers head to the mall less frequently and shop more online. The department store chain has been refreshing its interiors and focusing on improving its product assortment. It also has been experimenting with new store formats such as Backstage, which aims to compete with off-price retailers like T.J. Maxx.

Macy's CEO Jeff Gennette said customers were responding to the fresh merchandise and its marketing, particularly in the days leading up to Christmas.

That was welcome news. In the fiscal third quarter, Macy's posted its first same-store sales decline in two years, and slashed its outlook for the year. Macy's attributed the drop to weakening foot traffic at its stores and unseasonably warm weather, which hurt demand for sweaters and jackets.

But department stores as a whole have been struggling. Sales in the sector fell 1.8% from Nov. 1 through Dec. 24, according to Mastercard Spending Pulse, which tracks retail spending across all payment methods.

During the holiday season, some retailers were offering steep discounts to bring people into their stores, which in turn will put pressure on profit margins. Stores that sell apparel have been particularly challenged in recent quarters.

Many industry watchers expect department store operators will need to shutter more locations in order to become more profitable.

Macy's has already been through several rounds of store closures in recent years. In November, Gennette said it was seeing weaker-than-expected performance at "lower-tier malls."

Gennette, a longtime Macy's executive, took over as CEO in 2017.

Macy's shares, which have a market value of about $5.5 billion, are down more than 40% over the past year.

News of the store closures was first reported by The Wall Street Journal.