Department store operator Kohl's on Thursday reported quarterly earnings and sales that topped Wall Street estimates, as the retailer rung up more purchases than expected in July, the final month of the period.

Kohl's reported a narrower, 0.4 decline in same-store sales, compared to a drop of 1.8 percent during the same quarter last year. Analysts were expecting comparable sales to fall 1.5 percent, according to FactSet.

Shares of Kohl's were recently down 9 percent on the news, after initially jumping 4 percent in premarket hours.

"The traffic momentum that we saw in the combined March/April period accelerated in the second quarter," CEO Kevin Mansell said in a statement. "Though transactions for the quarter were lower than last year, July transactions increased. ... We are also excited by the sequential sales trend improvement in all our lines."

Trying to drive shoppers back to its stores, Kohl's has been testing new initiatives, like entering a partnership with Under Armour to sell the sports retailers merchandise. Management said on Tuesday that it's also beginning to see benefits from initiatives in place with the goals of better managing inventory and cutting costs.

"Under Armour in particular continued a very strong performance and beat the sales plan across almost all categories," Mansell said on Thursday's earnings conference call. "We've gained significant share in active apparel and footwear in the first half of the year and expect that to continue in the back half based on assortment improvements and our momentum."

The company's net income rose to $208 million, or $1.24 per share, in the second quarter, from $140 million, or 77 cents per share, a year earlier. Net sales fell 1 percent, to $4.14 billion.

Analysts on average were expecting Kohl's to report an adjusted profit of $1.19 per share and revenue of $4.13 billion, according to a survey by Thomson Reuters.

"While Kohl's sales continue to decline, these results are nevertheless rather encouraging," GlobalData Retail analyst Anthony Riva said Thursday in a note to clients.

"The much smaller dip in revenues indicates that the business is going in the right direction and has gained momentum since the start of the year. ... We are particularly encouraged to see comparable sales come in virtually flat."

Kohl's reported a 48.6 percent rise in second-quarter profit from a year earlier, when it had recorded charges of $128 million related to impairments and store closures.

"Kohl's provides an example of how discipline and focus in range planning can help take the edge off some of the prevailing challenges in the market without the need to resort to high levels of capital expenditure," Riva added. "To a large extent, Kohl's has managed to buck the negative customer traffic trend by making its stores, and the product within them, more relevant."

As of Wednesday's market close, shares of Kohl's had fallen 15 percent in 2017. But the stock has climbed higher of late and is up about 14.5 percent from a month ago.

Other department stores Macy's, Dillard's, Nordstrom and J.C. Penney are also set to report second-quarter earnings this week.

—Reuters contributed to this reporting.