NEW YORK: With shoppers in a mood to spend, particularly on clothing, Macy’s surpassed profit and revenue expectations for the first quarter of the year and raised its outlook.

The company reported its second straight quarter of higher sales at existing stores after a three-year funk. Its shares surged nearly 9 percent Wednesday, and the stocks of other department store chains rose as well. The rosy performance bodes well for J.C. Penney and Nordstrom, both set to report their quarterly results on Thursday. All are working to appeal to shoppers who are spending more online rather than at department stores.

Macy’s, the first of the group to release its results, has been expanding its store label brands, adding more of the off-price Backstage stores, and upgrading its checkout technology to make it faster and easier for shoppers. It’s also testing more curated merchandise displays and localized marketing. It also recently bought the concept store called Story, which rotates themes and what it sells every few months, and brought Story’s founder Rachel Shechtman aboard to create better shopping experiences at Macy’s.

Chairman and CEO Jeff Gennette said the company saw strength across its Bloomingdale’s, Bluemercury and Macy’s brands. He said results are improving at its stores, coupled with robust online and mobile growth. Macy’s also said business got a lift from an increase in spending from international tourists, the first time since 2014.

“While we have more work to do, the continuing improvement in our stores is encouraging,” Gennette said in a statement.

Macy’s results follow government data released Tuesday showing that U.S. retail sales rose a solid 0.3 percent in April, a sign that shoppers may be rebounding from weak spending earlier this year. The spending gains were spread across most retail categories, especially big increases at furniture and clothing stores. Those are trends that could help department stores.

For the period ended May 5, Macy’s Inc. earned $139 million, or 45 cents per share. A year earlier, the company earned $78 million, or 26 cents per share. Stripping out impairment charges and other costs, earnings were 48 cents per share. Excluding asset sales gains, earnings were 42 cents per share. Analysts had expected earnings of 36 cents per share.