China’s legislature has unanimously approved the reappointment of Xi Jinping as president with no limit on the number of terms he can serve.

The National People’s Congress also appointed close Xi ally Wang Qishan to the formerly ceremonial post of vice-president.

At the Great Hall of the People, Xi, Wang and other officials took turns stepping to the lectern to place their left hands on the constitution and raise their right fists as they delivered an oath swearing loyalty to the constitution, the motherland and the people.

Xi’s reappointment was approved by all 2,970 members of the NPC in attendance, while there was only one vote against Wang’s appointment.

Xi, who leads the ruling Communist party, was also reappointed as head of the government commission that commands the military. He is already head of an identical party body overseeing the armed forces.

The 64-year-old is considered the most powerful Chinese leader since Mao Zedong. Last weekend, Xi was given the right to continue in office indefinitely after the NPC scrapped term limits for the president and vice-president.

Chinese officials defended the move, saying it would bring the presidency in line with Xi’s positions as head of the party and commander of the armed forces.

But critics say it is likely to lead to increased political repression and possible infighting among party factions seeking to promote their own candidates within the closed system.

Xi became president in 2013 and has not said how many additional five-year terms he intends to serve. State media said the removal of term limits would not alter conditions for retirement or create a president in perpetuity.

As China’s vice-president, Wang, 69, is expected to be a key element in furthering Xi’s agenda of shoring up Communist party rule while ending corruption and poverty.