Macy's is raising its annual profit forecast as the department store reported an unexpected increase in a key sales measure.

The department store chain has now reported its third straight quarter of higher sales at existing stores after a three-year slump, though the sales momentum slowed.

The company said it earned $166 million, or 53 cents per share, for the quarter. That compares with $111 million, or 36 cents per share, in the year-ago period. Sales fell slightly to $5.57 billion from $5.64 billion.

FILE- In this Feb. 12, 2018, file photo the sign on a Macy's store in Homestead, Pa., is worked on. Macy's Inc. reports earnings Wednesday, Aug. 15. (AP PhotoGene J. Puskar, File)

FILE- In this Feb. 12, 2018, file photo the sign on a Macy's store in Homestead, Pa., is worked on. Macy's Inc. reports earnings Wednesday, Aug. 15. (AP PhotoGene J. Puskar, File)

Analysts were expecting profit of 50 cents on sales of $5.5 billion.

Sales at stores opened at least a year rose 0.5 percent, slower than the 4.2 percent increase in the prior quarter.

Like many department stores, Macy's is reinventing itself as shoppers move online.