Beijing: China’s parliament formally elected heir-in-waiting Xi Jinping as the country’s new president on Thursday, completing the country’s second orderly political succession since the Communist Party took power in 1949.

The largely rubber-stamp National People’s Congress chose Xi in a tightly scripted ceremony at the Great Hall of the People in central Beijing, putting the final seal of approval on a generational transition of power.

Xi was appointed party and military chief—where real power lies—in November.

The 59-year-old was also elected head of the Central Military Commission, the parallel government post to the party’s top military position which he already holds, ensuring that he has full power over the party, state and armed forces.

There was virtually no opposition among the carefully selected legislators to Xi becoming president. Xi drew just one no vote and three abstentions from the almost 3,000 delegates.

Xi bowed deeply and shook hands with his predecessor Hu Jintao upon the announcement of the result, carried live on state television. Xi and Hu exchanged a few inaudible words.

Li Yuanchao was also elected vice-president. Vice Premier Li Keqiang is set to succeed Premier Wen Jiabao in a similarly scripted vote on Friday.

Hu, 70, relinquished the presidency after serving the maximum two five-year terms.

Hu’s accession to president a decade ago marked Communist China’s first peaceful transition of power. Violent events such as the Cultural Revolution and the 1989 Tiananmen crackdown on pro-democracy demonstrators had overshadowed previous hand-overs.

Since taking up the position of the much more powerful post of party chief last November, Xi has focused his rhetoric on fighting corruption and promoting austere practices such as banning senior military officers from holding alcohol-fuelled banquets.

Many Chinese hope Xi will bring change in a country that has risen to become the world’s second-biggest economy, but is marred by deepening income inequality, corruption and environmental destruction left over from the administration of Hu and Wen.

Xi inherits a constituency that is more distrustful of government and well-versed at using the Internet to criticise their leaders.

At the same time, his administration must deal with a slowdown in economic growth, juggle the urgent task of calming a frothy housing market, defuse local government debt risks and wean China off its addiction to investment-led expansion.

Xi will also have to deal with an increasingly provocative North Korea and tensions with the US, Japan and Southeast Asia.