* Q1 pretax profit 3.5 bln SEK vs consensus 3.8 bln
* Gross margin 54.9 pct vs forecast 55.3 pct
* Says most of March sales rose 12 percent on the year
* Plans online launch in Spain, Italy and China
* Shares down 4.4 percent
(Adds analyst, background, details, shares)
STOCKHOLM, March 27 (Reuters) - Hennes & Mauritz, the world's No.2 fashion retailer, missed first-quarter profit forecasts as it invested to catch up with rivals online in an increasingly competitive budget clothing market.
The weaker-than-expected performance contrasts with solid results last week from bigger rival Inditex, which is benefiting from rapid growth in Internet sales as well as its stronger presence than H&M in emerging markets.
H&M and Inditex weathered the recent economic downturn in Europe better than many clothing firms, thanks to their focus on fast-changing fashions at affordable prices. But competition has picked up, with discount rivals such as Britain's Primark and U.S. group Forever 21 expanding across Europe and online firms such as ASOS grabbing market share.
H&M said on Thursday pretax profit rose 8 percent to 3.5 billion Swedish crowns ($542 million) in the three months ended Feb. 28, below even the lowest estimate in a Reuters poll of analysts.
The Swedish group said this was partly due to investments in IT and online - where it went live in France this month - as it tries to recover from a slow start in growing Internet sales.
But some analysts were disappointed by the 12 percent rise in quarterly sales at local currencies, which continued at that level in March, and were concerned higher-than-expected stock levels could lead the firm to cut prices in the months ahead.
"While part of this miss can be attributed to long-term investments, we believe it is also indicative of weak like-for-like sales performance and price investment, as the company tries to compete in the fast-growing and increasingly populous value apparel world," Bernstein analysts said of the results.
"Sales performance does not seem to have improved in March, and the comps (comparative figures from last year) only get more difficult in April and May. Furthermore, the high inventory levels suggest H&M may see further margin pressure from increased levels of markdown."
At 0920 GMT, H&M shares were down 4.4 percent at 277.1 Swedish crowns, one of the biggest falls by a European blue-chip stock.
H&M Chief Executive Karl-Johan Persson said the fashion market was "still characterised by a challenging macroeconomic situation", as much of Europe battles to emerge from recession.
H&M's gross profit margin came in at 54.9 percent in the first quarter, below a forecast of 55.3 percent and down from 55.2 percent a year ago.
Inditex, which owns the Zara brand, managed to keep gross margin flat in the three months to end January at 57.9 percent.
H&M, which has almost 3,200 stores, about half that of Inditex, is targeting Australia, the Philippines and India as new markets this year and plans to roll out online services in Spain, Italy and China.
It is also responding to competition by broadening its product offering and rolling out new mid-market brands such as COS and & Other Stories, which it said will open stores in several new countries this year, including the United States.
The group also said it would roll out its well-received new sports line to more stores and countries.
($1 = 6.4585 Swedish Crowns)
(Additional reporting by Emma Thomasson in Berlin; Editing by Mark Potter)