Both Apple and Samsung have had a record quarter for smartphone sales, but the Korean company widened its lead over its US rival.

Samsung sold a record 86 million handsets in the fourth quarter, representing a global smartphone market share of 29.6%, according to research firm Strategy Analytics.

Meanwhile, Apple has set an all-time quarterly record in its flagship iPhone sales, selling 51 million pieces, according to the company's quarterly report. IPhone's global market share was 17.6% in the fourth quarter.

However, Apple's sales volume fell short of estimates sending the company shares down more than 8% in after hours.

In North America, Apple experienced supply shortfalls for its latest iPhone 5s due to high customer demand, CEO Tim Cook said during a conference call with analysts.

The iPhone maker's market share slipped from the previous year's 22%, as China's Huawei Technologies and Lenovo Group rose to become the world's No.3 and No.4 respectively. The companies sold 16.6 million and 13.6 million smartphones, representing 5.7% and 4.7% of the market, respectively.

"There is clearly now more competition coming from the second-tier smartphone brands. Huawei, LG Electronics and Lenovo each grew their smartphone shipments around two times faster than the global industry average," Strategy Analytics analyst Linda Sui said.

"Samsung and Apple will need to fight hard to hold off these and other hungry challengers during 2014."

For the full year 2013, global smartphone shipments increased 41% to reach a record 990 million.

In 2013, Samsung sold 319.8 million smartphones, the "largest number of units ever shipped by a smartphone vendor in a single year," according to the analyst group's executive director Neil Mawston.

Samsung also retained its title as the world's biggest mobile phone maker overall. The Korean company shipped 451 million units for a 27% share of the market.

Meanwhile, Apple sold 153.5 million smarphones in 2013 for a market share of 15.5%.

"Apple remains strong in the high-end smartphone segment, but a lack of presence in the low-end category is costing it lost volumes in fast-growing emerging markets such as India," Mawston noted.