China overtook the U.S. in both PC sales and shipments in the second quarter, according to research firm IDC.

China's PC sales reached $11.9 billion, while U.S. PC sales fell behind to $11.7 billion. For shipments, China saw a 14.3% increase to 18.5 million units year-over-year. But in the U.S., PC shipments dropped by 4.9% to 17.7 million units.

It's the first time China has overtaken the U.S. in shipments and sales. "We weren't expecting this to happen in this quarter," said Bryan Ma, an associate vice president with IDC. Previous projections had expected China to take the lead some time in 2012.

However, China saw more enterprise PC purchases than expected from the public sector in the second quarter, while U.S. PC purchases were dragged down by economic conditions and tablet sales, Ma said.

U.S. PC sales are expected to pick up and surpass China in the fourth quarter because of the U.S. holiday buying season -- but during the full year of 2012 and onward, China will retake the position as the biggest PC market for both sales and shipments, Ma added.

Worldwide, PC shipments have grown at a slower pace because of softening consumer demand and rising interest in tablets, according to IDC. China, however, continues to see more rapid growth, partly simulated by Chinese government infrastructure projects and consumer outreach programs to replace older PCs, Ma said.

The country's growing market bodes well for Chinese PC maker Lenovo, which is the fastest growing company among the top five PC vendors, according to IDC. Lenovo is the largest PC maker in China with a 31.7% share of the market.