Hewlett-Packard Co. (NYSE: HPQ) narrowly retained its spot as No. 1 in global PC sales but China's Lenovo Group (Pink: LNVGY) is within striking distance, market researcher Gartner Group (NYSE: IT) reported.

In the second quarter, HP sold 13 million PCs for a 14.9 percent global share, compared with 12.82 million for Lenovo, Gartner estimated. Taiwan's Acer Group (Taipei: 2353) knocked Dell (Nasdaq: DELL) from third place to fourth.

Dell, of Round Rock, Tex., sold only 9.35 million units, as shipments eased 11.5 percent from 2011.

In the U.S., Apple (Nasdaq: AAPL), the world's most valuable technology company, was No. 3, with a 12 percent share, up 4.3 percent, or 1.9 million units, Gartner said.