China\'s economy grew at its slowest pace in 13 years in 2012, the government said Friday, but an uptick in the final quarter pointed to better news ahead for a prime driver of the tepid global recovery. Gross domestic product (GDP) in the world\'s second-largest economy expanded 7.8 percent last year in the face of weakness at home and in key overseas markets, the National Bureau of Statistics (NBS) announced. But it grew 7.9 percent in the final three months of 2012 as industrial production and retail sales growth strengthened at the end of the year, snapping seven straight quarters of slowing growth in a positive sign for the spluttering world economy. The official statistics come as optimism grows among analysts that China will pick up steam in 2013 after two years of relative weakness, although they -- and the government -- caution that the improvement will not be dramatic. \"The international economic environment remains complicated this year and... there are still unbalanced conflicts in the Chinese economy,\" NBS chief Ma Jiantang told reporters. Still, Ma added: \"We expect China\'s economy to continue to grow in a stable manner in 2013.\" Chinese stocks rose on the figures, with the Shanghai Composite Index closing up 1.41 percent. The slowdown in annual growth was the second in a row and marked its lowest point since 1999, when it stood at 7.6 percent, according to official statistics. Expansion has slowed amid weakness in the global economy, particularly the key export markets of the United States and Europe, and as the government took steps to cool a once red hot property market. But its growth rate remains the highest among leading economies. GDP reached 51.9 trillion yuan ($8.28 trillion) in 2012, further cementing its position as the world\'s number two economy behind the United States. The GDP figures were just ahead of expectations, with economists surveyed by AFP having projected growth of 7.7 percent in 2012 and 7.8 percent in the fourth quarter, and anticipating acceleration to 8.0 percent this year. IHS Global Insight senior economist Ren Xianfang said the worst was probably over for China and while it had avoided a \"hard landing\", 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. 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. But the boom was accompanied by a growing wealth gap, worrying authorities who are keen to avoid public discontent and the threat of social unrest in the country of 1.35 billion people. Underscoring that sensitivity, the NBS announced China\'s Gini coefficient, a commonly used measure of inequality, for the first time since 2000, saying it stood at 0.474 in 2012. A figure of 0 represents perfect equality and 1 total inequality, with some academics viewing 0.40 as a warning line. 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 country\'s economy is widely seen as having matured to the point where the growth model of the past, including public spending for big ticket infrastructure projects, must be modified. The statistics bureau also released other key indicators, with industrial production growing 10.0 percent in 2012, and retail sales up 14.3 percent. Fixed-asset investment, a key measure of government spending on infrastructure, expanded 20.6 percent to 36.5 trillion yuan in the year -- equivalent to just over 70 percent of GDP.