Macy's said a stellar performance at its businesses helped push quarterly same-store sales and profit well above Wall Street estimates, signaling the company was keeping up in a fiercely competitive retail landscape.

Macy's shares surged more than 13% in pre-market trading after the company also raised its full-year profit forecast and issued a comparable sales growth guidance that topped estimates. 

Like its peers, Macy's has faltered in the past few years as it struggled to adjust to a market where shoppers increasingly buy goods online. 

The company closed more than 100 stores since 2015 and cut thousands of jobs as store traffic plummeted and customers defected to off-price and fast-fashion sellers. 

Macy's also said it would end a joint venture agreement with Fung Retailing Ltd in China, that it formed in 2015 with a 65% stake, but said it would remain active on Alibaba's e-commerce platform TMall as well as social media channels. 

The company said its first-quarter same-store sales rose 4.2%, easily beating Wall Street's 1.4% average estimate, as sales rose at its Bloomingdale's, Bluemercury and its own Macy's stores. 

This was the second quarter of same-store sales growth in a row. 

The quarter also benefited from a change in accounting that shifted its Friends & Family promotional programme from the second quarter to the first, the company said. 

"We exceeded our expectations and saw strong performance across all three brands as well as across all geographic regions," Macy's chief executive Jeff Gennette said. 

The company said it now expects adjusted profit of $3.75 to $3.95 per share for the year, up from a previous forecast of $3.55 to $3.75. 

It also forecast full-year comparable sales at its owned plus licensed stores to rise between 1-2%. Analysts on average were expecting 0.3% growth, according to Thomson Reuters. 

Net income attributable to Macy's shareholders nearly doubled to $139 million, or 45 cents per share, in the first quarter ended May 5. Excluding one-time items, it earned 48 cents per share. 

Net sales rose 3.6% to $5.54 billion in the quarter. 

Analysts on average were expecting earnings of 37 cents per share, and revenue of $5.36 billion.