Nokia's earnings fell less than expected in the first quarter and the company signed a final agreement to start using Microsoft software, sending its shares 3 percent higher.

Underlying earnings per share fell to 0.13 euro in the three months through March from 0.14 euro a year earlier, beating analysts' average forecast for 0.10 euro.

Nokia's market share fell to 29 percent from 33 percent as nimbler Asian rivals ate into its dominant position in cheaper phones and it continued to lose out in more expensive smartphones to Apple and others.

To turn around its smartphone fortunes, Nokia's new Chief Executive Stephen Elop in February unveiled a deal to start using Microsoft software instead of its own Symbian platform.

Nokia said the deal enables it to cut annual costs by around 1 billion euros ($1.5 billion).

Finalisation of the agreement with Microsoft means Nokia can now focus on execution, but margin guidance underlines that difficult times lie ahead as it transitions the portfolio, said analyst Geoff Blaber from CCS Insight.

Nokia's key phone unit reported an operating profit margin of 9.8 percent for January-March, well ahead of analysts forecast of 8.6 percent, but said for the full year the margin would fall to within a 6 to 9 percent range.

(Editing by David Holmes)