Motorola Inc's quarterly profit was slightly ahead of expectations and its smartphones sold better than expected in its first quarter selling phones running Google Inc's Android software.

Motorola, which is betting the future of its mobile phone business on Android, said it sold 2 million smartphones in the quarter, above Wall St estimates.

But the company's shares fell 5 percent as the company said it would post a loss for the current quarter. Most analysts had expected it to post a profit.

Morgan Keegan analyst Tavis McCourt said Motorola handily beat his expectation for 1.3 million smartphone sales but he noted that the company's other units, its enterprise business and its set-top box and networks unit underperformed slightly.

It was a mixed quarter. Smartphones, which are most important, had a very good quarter, McCourt said.

Motorola, which has lost market share for years to rivals such as Nokia and Apple Inc, posted a fourth-quarter profit of $142 million, or 6 cents per share, compared with a loss of $3.66 billion, or $1.61 per share, a year earlier when it took big non-cash charges.

Excluding unusual items earnings per share would have been 9 cents versus analyst expectations of 8 cents, according to Thomson Reuters I/B/E/S.

Revenue fell about 20 percent to $5.7 billion. After taking into account a $200 million deferral of revenue related to its smartphone sales, this was almost in line with average analyst expectations for $5.94 billion.

The company sold 12 million phones in the quarter compared with average expectations for 14.8 million from analysts polled by Reuters.

Last year Motorola canceled a lot of phones as its co-chief executive Sanjay Jha made a bold bet that Android smartphones would be the key to turning around the company.

Motorola said sales in its mobile devices unit were $1.8 billion, down 22 percent from a year ago but up slightly from $1.7 billion in the third quarter.

Jha had promised that Motorola would make a profit in at least one quarter of 2010 but for the first quarter the company forecast a per share loss of 1 cent to 3 cents, excluding certain charges but including expenses of about 4 cents a share for amortization of intangibles and stock-based compensation expenses.

Shares in Motorola were down 37 cents at $7.03 in premarket trading.

(Reporting by Sinead Carew; Editing by Derek Caney)