Hewlett-Packard Co's personal computer shipments grew 5.3 percent in the third quarter, while China's Lenovo overtook Dell to become the world's No. 2 PC maker for the first time, according to data from two influential research firms.

HP -- which is scrambling to decide whether to sell, keep or spin off its PC division by the end of October -- now commands a 17.7 percent share of an ailing global market, up marginally from 17.3 percent a year ago, tech research house Gartner said.

Rival firm IDC put HP's market share at 18.1 percent. IDC also ranked HP, Lenovo and Dell Nos. 1, 2 and 3.

Wall Street analysts had speculated a premature announcement about the potential spinoff of HP's largest division would drive customers away.

Lenovo, aided by a laptop-sales tie-up with Japan's NEC and aggressive marketing, expanded its market share to 13.5 percent from 11.1 percent, eclipsing Dell's 11.6 percent.

PC sales are sputtering as consumers turn increasingly to mobile devices from smartphones to tablets like Apple Inc's iPad, while faltering economies pressure corporate spending on technology hardware.

But IDC foresaw a bounceback in 2012 as HP and other PC makers begin to crank out smaller ultra-mobile computers.

For the moment, PCs have taken a backseat to a range of other devices competing for shrinking consumer and business budgets, said Jay Chou, senior research analyst with IDC.

While growth is expected to stay in mid-single digits in the fourth quarter, we should see faster growth in 2012 and beyond.

U.S. PC shipments edged up just 1.1 percent to 17.8 million units in the third quarter, according to Gartner. While anemic, that marked the first time shipments had grown in three straight quarters. HP notably expanded its shipments by 15.1 percent in its home market, the firm said.

Despite the potential spinoff of its PC business, HP executives' efforts to give the appearance of 'business as usual' seemed to work, Gartner wrote in its statement.

Emerging markets -- such as Lenovo's backyard, China -- remain however a rare bright spot in an otherwise gloomy outlook.

The PC industry has been performing below normal seasonality, said Mikako Kitagawa, principal analyst at Gartner. As expected, back-to-school PC sales were disappointing in mature markets, confirming that the consumer PC market continues to be weak. The popularity of non-PC devices, including media tablets, such as the iPad and smartphones, took consumers' spending away from PCs.

As the PC market faced a slowdown, vendor consolidation has become a more apparent trend in the industry. Lenovo's recent merger with NEC, and its acquisition of Medion, as well as HP's announcement that it may spin off or sell its PC business, underlined this trend during the quarter.

(Reporting by Edwin Chan; Editing by Gary Hill)