Motorola

(MOT)

, the world's second-largest mobile phone maker, reported Wednesday that its earnings nearly doubled in the second quarter, meeting Wall Street's expectations, as margins in the faltering handset business showed improvement.

Those expectations were lowered on April 11, after the company, based in Schaumburg, Ill., reported first-quarter earnings. At that time, it warned that second-quarter earnings would fall

short of forecasts because of weaker-than-expected profits in its cellular telephone division. That day, shares of Motorola fell 17%.

Excluding special items, for the second quarter ended July 1, Motorola posted earnings from continuing operations of $515 million, or 23 cents a diluted share, up 91% from $269 million, or 13 cents a share, in the comparable quarter a year earlier. The consensus estimate of analysts polled by

First Call/Thomson Financial

was for the company to earn 23 cents a share in the latest quarter.

Revenue rose 22%, to $9.255 billion, from $7.595 billion a year earlier.

Shares of Motorola closed Wednesday trading at 35 5/16, up 1 3/4 or 5%. In aftermarket trading, shares were up 15/16, or 3%, to 36 1/4, according to

Instinet

.

Because of the problems last quarter, by far the most closely watched unit in Motorola's latest quarter was the personal communications, or handset business. "We made good progress in addressing the profitability issues experienced by the personal communications segment in the first quarter," said Robert Growney, president and chief operating officer of Motorola, in a statement.

Driven by improved gross margins from phone products and better overall conversion costs in manufacturing, operating margins for the unit recovered to 4% of sales in the second quarter vs. 2% of sales in the first quarter of the year.

Sales in the company's personal communications unit rose 20% to $3.3 billion. Operating profits increased to $132 million, compared with $125 million a year earlier.

The problems in the handset business stemmed largely from a component shortage and the fact that Motorola's lower-cost handsets -- which yield lower profit margins -- were selling better than its more expensive models, especially in Europe.

Though Motorola seems to be progressing in its drive to bring margins back from the 1.5% levels of March, there are numerous challenges ahead.

"The company is a strong second-place participant in the industry

behind

Nokia

(NOK) - Get Report

of Finland and should benefit from a significant rollout of new handsets throughout the second half," wrote Marc Cabi, an analyst at

Credit Suisse First Boston

, in a report published on July 6.

However, he continued, "To succeed, he

Mike Zafirovsky, the newly appointed head of the unit must avoid ghosts that have haunted the segment in the past, including misforecasting product mix and market demand and struggling with component issues in a light market."

Cabi rates Motorola a hold and his firm has done no underwriting for the company.

The company will hold its second-quarter earnings conference call on Thursday at 8 a.m. EDT.