STOCKHOLM (Reuters) - Fashion retailer H&M reported a much smaller than expected fall in quarterly profit on Friday as it sold more products at full price and margins held up, in a first sign that its turnaround strategy is producing results.

Shares in H&M, the world’s biggest clothing retailer after Zara-owner Inditex, surged as much as 15.8 percent as the Swedish group said it expected sales at discounted prices to continue to fall in the current quarter.

H&M has trailed Inditex in performance and seen its profits shrink and stocks pile up in recent years as it failed to react quickly enough to demand swings and a boom in e-commerce.

Friday’s profit and margin beat indicated that H&M’s plan to revive profit growth, which has involved heavy investment in logistics, integration of stores and online business and an in-depth review of its stores and brands, was working.

Pretax profit in its first quarter, which runs from December-February, fell for the seventh straight quarter to 1.04 billion Swedish crowns ($112 million), from 1.26 billion a year ago. But it was well ahead of the 708 million forecast in a Reuters poll of analysts.

H&M said its gross margin inched up to 50.0 percent in the first quarter, from 49.9 percent a year ago, defying forecasts for a fall to 49.4 percent.

H&M’s markdowns in relation to sales decreased by around 1.5 percentage points in the first quarter from a year earlier and the retailer said it expected them to continue to decrease in relation to sales in the second quarter.

“Our ongoing transformation work has contributed to stronger collections with increased full-price sales, lower markdowns and increased market shares,” CEO Karl-Johan Persson said in a statement.

H&M shares were up 14.3 percent at 160 Swedish crowns by 0809 GMT, giving up some early gains but still the top gainer on the pan-European Stoxx 600 index. By Thursday’s close the shares had fallen 3 percent over the past year.

The results put H&M on a strong footing against Inditex, which has outperformed rivals for years but gave investors reason to fret this month when its full-year results showed limited margin growth and indicated sales were slowing.

H&M’s margins continue to lag Inditex, which reported a gross margin of 56.7 percent for the full year ending January 2019, versus 56.3 percent a year earlier.

Still, RBC analyst Richard Chamberlain said in a note that he expected consensus for H&M’s earnings for the full year ending in November 2019 to be upgraded by 5 to 10 percent. Analysts polled ahead of results had expected full-year pretax profit of 15.40 billion crowns versus 15.64 billion a year earlier.

The retailer said that net sales this month, from March 1-27, rose by 7 percent in local currencies, exceeding 4 percent growth in the first quarter.

“It’s still a shaky market and we are still in a transition period, but we believe in gradual improvement,” Persson said, when asked by investors if he expected the positive sales trends to continue in April and May.