The worldwide smartphone market saw record sales in the quarter, with growth of 38.8 per cent from a year ago and 258.4 million units sold, the IDC survey said.
The South Korean electronics giant Samsung group widened its lead, shipping 81.2 million smartphones, boosting its market share by nearly half a percentage point to 31.4 per cent.
Apple sold 33.8 million iPhones in the quarter (iPhone 5, iPhone 5S, iPhone 5C) but its growth was slower than the overall market, so its share slipped to 13.1 per cent from 14.4 per cent a year ago.
China's Huawei moved into third place, propelled by 76 per cent year-over-year growth. It sold 12.5 million smartphones, grabbing a market share of 4.8 per cent, just ahead of the 4.7 per cent for fellow Chinese firm Lenovo.
South Korea's LG slipped from third to fifth place, with a 4.6 per cent share, despite sales growth of 71 per cent.
"Beyond Samsung and Apple inc at the top of the rankings is a tight race of vendors trying to break out from the pack," said IDC analyst Ramon Llamas
"Chinese vendors Huawei and Lenovo moved past LG, and not far behind are two more Chinese companies, Coolpad and ZTE."
The survey did not break down the market share for Android, the dominant operating platform from Google, but it suggests it is holding in a range of 75 to 80 per cent.
Llamas said the smartphone market is still growing at a solid pace and expects annual sales of one billion units in 2014.
The overall mobile phone market grew 5.7 per cent from a year ago to 467.9 million units, with Samsung on top with a 24.7 per cent market share, IDC said.