The Chinese economy expanded 7.8 percent in 2012, the government has said, the worst performance in 13 years, in the face of weakness at home and in key overseas markets.

But gross domestic product (GDP) grew 7.9 percent in the final three months of the year, the National Bureau of Statistics (NBS) said, as it snapped seven straight quarters of slowing growth in a positive sign for the spluttering global recovery.

China's GDP reached $8.28 trillion in 2012, cementing its position as the world's second-largest economy after the US.

Annual growth slowed for a second straight year but the figures were just ahead of expectations, with economists surveyed by the AFP news agency having projected GDP growth of 7.7 percent in 2012, and 7.8 percent in the fourth quarter.

The official statistics come as optimism grows among analysts that China will pick up steam in 2013 after two years of relative weakness.

"The international economic environment remains complicated this year and... there are still unbalanced conflicts in the Chinese economy," NBS spokesman Ma Jiantang told reporters.

However, Ma added: "We expect China's economy to continue to grow in a stable manner in 2013."

'Shaky'

China's growth has slowed amid weakness in the global economy, particularly the key export markets of the US and Europe, and as the government took steps to cool a once red hot property market.

The annual growth figure was the lowest since 1999, when it stood at 7.6 percent, according to official statistics.

But IHS Global Insight senior economist Ren Xianfang said the worst was probably over for China's economy and that it had avoided a "hard landing", although challenges remained as it entered a "new normal" of slower growth.

"The rebound by itself looks quite shaky," she wrote in a report after the data. "The trajectory of recovery is flat, mirroring the shallow downturn it's rebounding from."

Growth had slowed for seven straight quarters through September, when the economy expanded 7.4 percent, the worst since early 2009. Annual GDP grew 9.3 percent in 2011 and 10.4 percent in 2010.

Qian Liu, from the Economist Intelligence Unit, told Al Jazeera that the figures were no real surprise. "It is very much in line with the market expectations," she said.

"The third quarter of 2012 was the slowest, and the last quarter was better. Looking ahead into 2013, we are confident that it will be even better. We at EUI are looking at an 8.5 percent growth."

Power handover

Successfully managing the economy is a key concern for China's leaders who derive much of their claims to legitimacy from the country's reform-led economic rise, which has lifted hundreds of millions of people out of poverty over the past three decades.

The government is due to formally conclude a once-in-a-decade power handover in March with Xi Jinping, already named Communist Party chief, becoming president, and Li Keqiang taking over as premier in charge of day-to-day administration.

The World Bank said last month that China's economy is expected to expand 8.4 percent this year, but added that longer-term GDP growth is expected to moderate as China's leaders move away from a growth model based on investment and exports.