Mobile phone maker Sony Ericsson swung to a surprise first-quarter pretax profit on Friday as its push into the growing smartphone market and hefty cost cuts boosted margins.

After a dismal 2009 in which the handset market contracted amid the global downturn, many analysts believe the outlook for the industry has improved in recent months, though Sony Ericsson stuck to its cautious forecast of only slight market growth in handset sales this year.

The world number four handset maker, owned by Sweden's Ericsson and Japan's Sony Corp, reported a pretax profit of 18 million euros ($25.2 million) for the period even though sales were down 19 percent.

The mean forecast in a Reuters poll of 27 analysts had been for a 157 million euro loss.

The company, which made a 370 million euro loss in the year ago period, said its gross margin was 31 percent, well above forecasts as costs fell sharply and it sold more higher-price smartphones offering PC-like functions and links to websites like Twitter and Facebook.

Bottom-line I think this confirms that they have now managed the turnaround from a cost perspective, said Nicolas von Stackelberg, analyst at Macquarie Research.

And now we need to hear from them how they want to go about regaining market share, which is of course critical given that it has now dwindled to 4 percent.

Sony Ericsson, the global number four phone maker, has been revamping its portfolio and cutting costs after seven straight quarters of losses.

We are pleased to see the positive impact of both the launch of new products and the business transformation program improving the company's results, Sony Ericsson President Bert Nordberg said.

Restructuring charges in the first quarter were 3 million euros against an average forecast of 51 million.

(Editing by David Holmes)